Skip to content

Commit

Permalink
[SPARC64]: Fix obppath pci device sysfs creation.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David S. Miller committed Apr 26, 2007
1 parent bc606f3 commit a378fd0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/sparc64/kernel/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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)
Expand Down

0 comments on commit a378fd0

Please sign in to comment.