Revert "powerpc/eeh: Fix crash when adding a device in a slot with DDW"
[pandora-kernel.git] / arch / powerpc / platforms / pseries / eeh.c
index 389e06b..5658690 100644 (file)
@@ -1238,6 +1238,7 @@ static void eeh_add_device_late(struct pci_dev *dev)
        pdn->pcidev = dev;
 
        pci_addr_cache_insert_device(dev);
+       eeh_sysfs_add_device(dev);
 }
 
 void eeh_add_device_tree_late(struct pci_bus *bus)
@@ -1255,29 +1256,6 @@ void eeh_add_device_tree_late(struct pci_bus *bus)
 }
 EXPORT_SYMBOL_GPL(eeh_add_device_tree_late);
 
-/**
- * eeh_add_sysfs_files - Add EEH sysfs files for the indicated PCI bus
- * @bus: PCI bus
- *
- * This routine must be used to add EEH sysfs files for PCI
- * devices which are attached to the indicated PCI bus. The PCI bus
- * is added after system boot through hotplug or dlpar.
- */
-void eeh_add_sysfs_files(struct pci_bus *bus)
-{
-       struct pci_dev *dev;
-
-       list_for_each_entry(dev, &bus->devices, bus_list) {
-               eeh_sysfs_add_device(dev);
-               if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) {
-                       struct pci_bus *subbus = dev->subordinate;
-                       if (subbus)
-                               eeh_add_sysfs_files(subbus);
-               }
-       }
-}
-EXPORT_SYMBOL_GPL(eeh_add_sysfs_files);
-
 /**
  * eeh_remove_device - undo EEH setup for the indicated pci device
  * @dev: pci device to be removed