]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[SPARC64]: Fix obppath pci device sysfs creation.
authorDavid S. Miller <davem@sunset.davemloft.net>
Thu, 1 Mar 2007 19:46:13 +0000 (11:46 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 26 Apr 2007 08:55:09 +0000 (01:55 -0700)
Need to traverse recursively down child busses else we only
get the file created under devices at the top-level.

Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc64/kernel/pci.c

index ec0d12a48c2bf9a70c1a39c7a0de68d486dfa7ef..425e883e7e3b714ff7653d86099e484b4e3bd266 100644 (file)
@@ -585,6 +585,7 @@ static DEVICE_ATTR(obppath, S_IRUSR | S_IRGRP | S_IROTH, show_pciobppath_attr, N
 static void __devinit pci_bus_register_of_sysfs(struct pci_bus *bus)
 {
        struct pci_dev *dev;
+       struct pci_bus *child_bus;
        int err;
 
        list_for_each_entry(dev, &bus->devices, bus_list) {
@@ -597,6 +598,8 @@ static void __devinit pci_bus_register_of_sysfs(struct pci_bus *bus)
                 */
                err = sysfs_create_file(&dev->dev.kobj, &dev_attr_obppath.attr);
        }
+       list_for_each_entry(child_bus, &bus->children, node)
+               pci_bus_register_of_sysfs(child_bus);
 }
 
 struct pci_bus * __init pci_scan_one_pbm(struct pci_pbm_info *pbm)