Commit a378fd0e authored by David S. Miller's avatar David S. Miller

[SPARC64]: Fix obppath pci device sysfs creation.

Need to traverse recursively down child busses else we only
get the file created under devices at the top-level.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bc606f3c
...@@ -585,6 +585,7 @@ static DEVICE_ATTR(obppath, S_IRUSR | S_IRGRP | S_IROTH, show_pciobppath_attr, N ...@@ -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) static void __devinit pci_bus_register_of_sysfs(struct pci_bus *bus)
{ {
struct pci_dev *dev; struct pci_dev *dev;
struct pci_bus *child_bus;
int err; int err;
list_for_each_entry(dev, &bus->devices, bus_list) { 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) ...@@ -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); 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) struct pci_bus * __init pci_scan_one_pbm(struct pci_pbm_info *pbm)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment