diff options
author | Alex Williamson <alex.williamson@redhat.com> | 2011-01-05 18:26:41 +0100 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2011-01-14 17:55:42 +0100 |
commit | ff29530e651a3449aea6b0ef4c7048db9e22ef27 (patch) | |
tree | 331a632f3fe03b1a1c97209e42ba2e4972dc5887 | |
parent | x86/PCI: make Broadcom CNB20LE driver EMBEDDED and EXPERIMENTAL (diff) | |
download | linux-ff29530e651a3449aea6b0ef4c7048db9e22ef27.tar.xz linux-ff29530e651a3449aea6b0ef4c7048db9e22ef27.zip |
PCI: sysfs: Update ROM to include default owner write access
The PCI sysfs ROM interface requires an enabling write to access the ROM
image, but the default file mode is 0400. The original proposed patch
adding sysfs ROM support was a true read-only interface, with the
enabling bit coming in as a feature request. I suspect it was simply an
oversight that the file mode didn't get updated to match the API.
Acked-by: Chris Wright <chrisw@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
-rw-r--r-- | drivers/pci/pci-sysfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 63d5042f2079..8ecaac983923 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c @@ -1149,7 +1149,7 @@ int __must_check pci_create_sysfs_dev_files (struct pci_dev *pdev) sysfs_bin_attr_init(attr); attr->size = rom_size; attr->attr.name = "rom"; - attr->attr.mode = S_IRUSR; + attr->attr.mode = S_IRUSR | S_IWUSR; attr->read = pci_read_rom; attr->write = pci_write_rom; retval = sysfs_create_bin_file(&pdev->dev.kobj, attr); |