diff options
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/pci_64.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/pci_dlpar.c | 6 |
2 files changed, 4 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index a9e311f7a9dd..2a4779091a58 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c | |||
@@ -208,7 +208,6 @@ long sys_pciconfig_iobase(long which, unsigned long in_bus, | |||
208 | unsigned long in_devfn) | 208 | unsigned long in_devfn) |
209 | { | 209 | { |
210 | struct pci_controller* hose; | 210 | struct pci_controller* hose; |
211 | struct list_head *ln; | ||
212 | struct pci_bus *bus = NULL; | 211 | struct pci_bus *bus = NULL; |
213 | struct device_node *hose_node; | 212 | struct device_node *hose_node; |
214 | 213 | ||
@@ -230,8 +229,7 @@ long sys_pciconfig_iobase(long which, unsigned long in_bus, | |||
230 | * used on pre-domains setup. We return the first match | 229 | * used on pre-domains setup. We return the first match |
231 | */ | 230 | */ |
232 | 231 | ||
233 | for (ln = pci_root_buses.next; ln != &pci_root_buses; ln = ln->next) { | 232 | list_for_each_entry(bus, &pci_root_buses, node) { |
234 | bus = pci_bus_b(ln); | ||
235 | if (in_bus >= bus->number && in_bus <= bus->busn_res.end) | 233 | if (in_bus >= bus->number && in_bus <= bus->busn_res.end) |
236 | break; | 234 | break; |
237 | bus = NULL; | 235 | bus = NULL; |
diff --git a/arch/powerpc/platforms/pseries/pci_dlpar.c b/arch/powerpc/platforms/pseries/pci_dlpar.c index efe61374f6ea..203cbf0dc101 100644 --- a/arch/powerpc/platforms/pseries/pci_dlpar.c +++ b/arch/powerpc/platforms/pseries/pci_dlpar.c | |||
@@ -37,15 +37,15 @@ find_bus_among_children(struct pci_bus *bus, | |||
37 | struct device_node *dn) | 37 | struct device_node *dn) |
38 | { | 38 | { |
39 | struct pci_bus *child = NULL; | 39 | struct pci_bus *child = NULL; |
40 | struct list_head *tmp; | 40 | struct pci_bus *tmp; |
41 | struct device_node *busdn; | 41 | struct device_node *busdn; |
42 | 42 | ||
43 | busdn = pci_bus_to_OF_node(bus); | 43 | busdn = pci_bus_to_OF_node(bus); |
44 | if (busdn == dn) | 44 | if (busdn == dn) |
45 | return bus; | 45 | return bus; |
46 | 46 | ||
47 | list_for_each(tmp, &bus->children) { | 47 | list_for_each_entry(tmp, &bus->children, node) { |
48 | child = find_bus_among_children(pci_bus_b(tmp), dn); | 48 | child = find_bus_among_children(tmp, dn); |
49 | if (child) | 49 | if (child) |
50 | break; | 50 | break; |
51 | }; | 51 | }; |