pcmcia: Use pci_is_bridge() to simplify code
authorYijing Wang <wangyijing@huawei.com>
Sun, 4 May 2014 04:23:47 +0000 (12:23 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 27 May 2014 20:58:24 +0000 (14:58 -0600)
Use pci_is_bridge() to simplify code.  No functional change.

Requires: 326c1cdae741 PCI: Rename pci_is_bridge() to pci_has_subordinate()
Requires: 1c86438c9423 PCI: Add new pci_is_bridge() interface
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pcmcia/cardbus.c

index 8bde61952d20e4371b26cd80b31098cb392b67ea..4fe4cc4ae19a297a0d0553e48e613cd50bc6e891 100644 (file)
@@ -78,8 +78,7 @@ int __ref cb_alloc(struct pcmcia_socket *s)
        max = bus->busn_res.start;
        for (pass = 0; pass < 2; pass++)
                list_for_each_entry(dev, &bus->devices, bus_list)
-                       if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE ||
-                           dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)
+                       if (pci_is_bridge(dev))
                                max = pci_scan_bridge(bus, dev, max, pass);
 
        /*