Skip to content

Commit

Permalink
PCI: sysfs: Update ROM to include default owner write access
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alex Williamson authored and Jesse Barnes committed Jan 14, 2011
1 parent 64a5fed commit ff29530
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pci/pci-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ff29530

Please sign in to comment.