diff options
author | Narendra K <Narendra_K@dell.com> | 2010-07-26 06:56:50 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2010-07-30 12:36:01 -0400 |
commit | 911e1c9b05a8e3559a7aa89083930700a0b9e7ee (patch) | |
tree | f0b95455c3808c7732ae819bfbb33332830bae00 /drivers/pci/pci-sysfs.c | |
parent | 8633328be242677fdedc42052838dd0608e7f342 (diff) |
PCI: export SMBIOS provided firmware instance and label to sysfs
This patch exports SMBIOS provided firmware instance and label of
onboard PCI devices to sysfs. New files are:
/sys/bus/pci/devices/.../label which contains the firmware name for
the device in question, and
/sys/bus/pci/devices/.../index which contains the firmware device type
instance for the given device.
Signed-off-by: Jordan Hargrave <jordan_hargrave@dell.com>
Signed-off-by: Narendra K <narendra_k@dell.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/pci-sysfs.c')
-rw-r--r-- | drivers/pci/pci-sysfs.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index f7692dc531e4..b5a7d9bfcb24 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c | |||
@@ -1165,6 +1165,8 @@ int __must_check pci_create_sysfs_dev_files (struct pci_dev *pdev) | |||
1165 | if (retval) | 1165 | if (retval) |
1166 | goto err_vga_file; | 1166 | goto err_vga_file; |
1167 | 1167 | ||
1168 | pci_create_firmware_label_files(pdev); | ||
1169 | |||
1168 | return 0; | 1170 | return 0; |
1169 | 1171 | ||
1170 | err_vga_file: | 1172 | err_vga_file: |
@@ -1232,6 +1234,9 @@ void pci_remove_sysfs_dev_files(struct pci_dev *pdev) | |||
1232 | sysfs_remove_bin_file(&pdev->dev.kobj, pdev->rom_attr); | 1234 | sysfs_remove_bin_file(&pdev->dev.kobj, pdev->rom_attr); |
1233 | kfree(pdev->rom_attr); | 1235 | kfree(pdev->rom_attr); |
1234 | } | 1236 | } |
1237 | |||
1238 | pci_remove_firmware_label_files(pdev); | ||
1239 | |||
1235 | } | 1240 | } |
1236 | 1241 | ||
1237 | static int __init pci_sysfs_init(void) | 1242 | static int __init pci_sysfs_init(void) |