summaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci.c
diff options
context:
space:
mode:
authorYijing Wang <wangyijing@huawei.com>2014-02-13 14:14:03 +0100
committerBjorn Helgaas <bhelgaas@google.com>2014-02-14 20:32:26 +0100
commit94e6a9b93064b49024b8701d2d81fcb4a821fa09 (patch)
treeb37fc0e841611cdd529c092184857e303e8aee66 /drivers/pci/pci.c
parentpcmcia: Use list_for_each_entry() for bus traversal (diff)
downloadlinux-94e6a9b93064b49024b8701d2d81fcb4a821fa09.tar.xz
linux-94e6a9b93064b49024b8701d2d81fcb4a821fa09.zip
PCI: Remove pci_bus_b() and use list_for_each_entry() directly
Replace list_for_each() with list_for_each_entry(), which means we no longer need pci_bus_b() and can remove it. Signed-off-by: Yijing Wang <wangyijing@huawei.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r--drivers/pci/pci.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 1febe90831b4..6f5ed88ca126 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -108,12 +108,12 @@ static bool pcie_ari_disabled;
*/
unsigned char pci_bus_max_busnr(struct pci_bus* bus)
{
- struct list_head *tmp;
+ struct pci_bus *tmp;
unsigned char max, n;
max = bus->busn_res.end;
- list_for_each(tmp, &bus->children) {
- n = pci_bus_max_busnr(pci_bus_b(tmp));
+ list_for_each_entry(tmp, &bus->children, node) {
+ n = pci_bus_max_busnr(tmp);
if(n > max)
max = n;
}