diff options
Diffstat (limited to 'drivers/pci/search.c')
-rw-r--r-- | drivers/pci/search.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/pci/search.c b/drivers/pci/search.c index 3ff2ac7c14e2..4a1b972efe7f 100644 --- a/drivers/pci/search.c +++ b/drivers/pci/search.c | |||
@@ -54,14 +54,14 @@ pci_find_upstream_pcie_bridge(struct pci_dev *pdev) | |||
54 | 54 | ||
55 | static struct pci_bus *pci_do_find_bus(struct pci_bus *bus, unsigned char busnr) | 55 | static struct pci_bus *pci_do_find_bus(struct pci_bus *bus, unsigned char busnr) |
56 | { | 56 | { |
57 | struct pci_bus* child; | 57 | struct pci_bus *child; |
58 | struct list_head *tmp; | 58 | struct pci_bus *tmp; |
59 | 59 | ||
60 | if(bus->number == busnr) | 60 | if(bus->number == busnr) |
61 | return bus; | 61 | return bus; |
62 | 62 | ||
63 | list_for_each(tmp, &bus->children) { | 63 | list_for_each_entry(tmp, &bus->children, node) { |
64 | child = pci_do_find_bus(pci_bus_b(tmp), busnr); | 64 | child = pci_do_find_bus(tmp, busnr); |
65 | if(child) | 65 | if(child) |
66 | return child; | 66 | return child; |
67 | } | 67 | } |
@@ -111,7 +111,7 @@ pci_find_next_bus(const struct pci_bus *from) | |||
111 | down_read(&pci_bus_sem); | 111 | down_read(&pci_bus_sem); |
112 | n = from ? from->node.next : pci_root_buses.next; | 112 | n = from ? from->node.next : pci_root_buses.next; |
113 | if (n != &pci_root_buses) | 113 | if (n != &pci_root_buses) |
114 | b = pci_bus_b(n); | 114 | b = list_entry(n, struct pci_bus, node); |
115 | up_read(&pci_bus_sem); | 115 | up_read(&pci_bus_sem); |
116 | return b; | 116 | return b; |
117 | } | 117 | } |