diff options
author | Jesse Barnes <jbarnes@virtuousgeek.org> | 2010-06-11 16:08:37 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2010-06-11 16:08:37 -0400 |
commit | 3be434f0244ee059432f92de7e891ee514f41738 (patch) | |
tree | eadb165d4848010faaf6cc02af401f51a46727d7 /drivers/pci/pci-sysfs.c | |
parent | f6d440daebd12be66ea1f834faf2966a49a07bd6 (diff) |
Revert "PCI: create function symlinks in /sys/bus/pci/slots/N/"
This reverts commit 75568f8094eb0333e9c2109b23cbc8b82d318a3c.
Since they're just a convenience anyway, remove these symlinks since
they're causing duplicate filename errors in the wild.
Acked-by: Alex Chiang <achiang@canonical.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 | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index afd2fbf7d797..c9957f68ac9b 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c | |||
@@ -1035,39 +1035,6 @@ error: | |||
1035 | return retval; | 1035 | return retval; |
1036 | } | 1036 | } |
1037 | 1037 | ||
1038 | static void pci_remove_slot_links(struct pci_dev *dev) | ||
1039 | { | ||
1040 | char func[10]; | ||
1041 | struct pci_slot *slot; | ||
1042 | |||
1043 | sysfs_remove_link(&dev->dev.kobj, "slot"); | ||
1044 | list_for_each_entry(slot, &dev->bus->slots, list) { | ||
1045 | if (slot->number != PCI_SLOT(dev->devfn)) | ||
1046 | continue; | ||
1047 | snprintf(func, 10, "function%d", PCI_FUNC(dev->devfn)); | ||
1048 | sysfs_remove_link(&slot->kobj, func); | ||
1049 | } | ||
1050 | } | ||
1051 | |||
1052 | static int pci_create_slot_links(struct pci_dev *dev) | ||
1053 | { | ||
1054 | int result = 0; | ||
1055 | char func[10]; | ||
1056 | struct pci_slot *slot; | ||
1057 | |||
1058 | list_for_each_entry(slot, &dev->bus->slots, list) { | ||
1059 | if (slot->number != PCI_SLOT(dev->devfn)) | ||
1060 | continue; | ||
1061 | result = sysfs_create_link(&dev->dev.kobj, &slot->kobj, "slot"); | ||
1062 | if (result) | ||
1063 | goto out; | ||
1064 | snprintf(func, 10, "function%d", PCI_FUNC(dev->devfn)); | ||
1065 | result = sysfs_create_link(&slot->kobj, &dev->dev.kobj, func); | ||
1066 | } | ||
1067 | out: | ||
1068 | return result; | ||
1069 | } | ||
1070 | |||
1071 | int __must_check pci_create_sysfs_dev_files (struct pci_dev *pdev) | 1038 | int __must_check pci_create_sysfs_dev_files (struct pci_dev *pdev) |
1072 | { | 1039 | { |
1073 | int retval; | 1040 | int retval; |
@@ -1130,8 +1097,6 @@ int __must_check pci_create_sysfs_dev_files (struct pci_dev *pdev) | |||
1130 | if (retval) | 1097 | if (retval) |
1131 | goto err_vga_file; | 1098 | goto err_vga_file; |
1132 | 1099 | ||
1133 | pci_create_slot_links(pdev); | ||
1134 | |||
1135 | return 0; | 1100 | return 0; |
1136 | 1101 | ||
1137 | err_vga_file: | 1102 | err_vga_file: |
@@ -1181,8 +1146,6 @@ void pci_remove_sysfs_dev_files(struct pci_dev *pdev) | |||
1181 | if (!sysfs_initialized) | 1146 | if (!sysfs_initialized) |
1182 | return; | 1147 | return; |
1183 | 1148 | ||
1184 | pci_remove_slot_links(pdev); | ||
1185 | |||
1186 | pci_remove_capabilities_sysfs(pdev); | 1149 | pci_remove_capabilities_sysfs(pdev); |
1187 | 1150 | ||
1188 | if (pdev->cfg_size < PCI_CFG_SPACE_EXP_SIZE) | 1151 | if (pdev->cfg_size < PCI_CFG_SPACE_EXP_SIZE) |