Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
[linux-2.6-block.git] / arch / powerpc / kernel / of_platform.c
index 07c12697d7083cb0645a3f4eb90cd0d94725d108..a7b743076720d3a2fc04dad98be34b0d55b40978 100644 (file)
@@ -71,10 +71,8 @@ static int of_pci_phb_probe(struct platform_device *dev)
        eeh_dev_phb_init_dynamic(phb);
 
        /* Register devices with EEH */
-#ifdef CONFIG_EEH
        if (dev->dev.of_node->child)
                eeh_add_device_tree_early(dev->dev.of_node);
-#endif /* CONFIG_EEH */
 
        /* Scan the bus */
        pcibios_scan_phb(phb);
@@ -88,13 +86,14 @@ static int of_pci_phb_probe(struct platform_device *dev)
        pcibios_claim_one_bus(phb->bus);
 
        /* Finish EEH setup */
-#ifdef CONFIG_EEH
        eeh_add_device_tree_late(phb->bus);
-#endif
 
        /* Add probed PCI devices to the device model */
        pci_bus_add_devices(phb->bus);
 
+       /* sysfs files should only be added after devices are added */
+       eeh_add_sysfs_files(phb->bus);
+
        return 0;
 }