[ARM] switch to new pci_get_bus_and_slot API
authorAlan Cox <alan@lxorguk.ukuu.org.uk>
Mon, 16 Oct 2006 15:49:50 +0000 (16:49 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 17 Oct 2006 16:19:59 +0000 (17:19 +0100)
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-ixp2000/ixdp2400.c
arch/arm/mach-ixp2000/ixdp2800.c
arch/arm/mach-ixp2000/ixdp2x00.c

index a6f1480..9ee6383 100644 (file)
@@ -133,11 +133,13 @@ static void ixdp2400_pci_postinit(void)
        struct pci_dev *dev;
 
        if (ixdp2x00_master_npu()) {
-               dev = pci_find_slot(1, IXDP2400_SLAVE_ENET_DEVFN);
+               dev = pci_get_bus_and_slot(1, IXDP2400_SLAVE_ENET_DEVFN);
                pci_remove_bus_device(dev);
+               pci_dev_put(dev)
        } else {
-               dev = pci_find_slot(1, IXDP2400_MASTER_ENET_DEVFN);
+               dev = pci_get_bus_and_slot(1, IXDP2400_MASTER_ENET_DEVFN);
                pci_remove_bus_device(dev);
+               pci_dev_put(dev)
 
                ixdp2x00_slave_pci_postinit();
        }
index 91d36d9..70d247f 100644 (file)
@@ -261,14 +261,16 @@ int __init ixdp2800_pci_init(void)
 
                pci_common_init(&ixdp2800_pci);
                if (ixdp2x00_master_npu()) {
-                       dev = pci_find_slot(1, IXDP2800_SLAVE_ENET_DEVFN);
+                       dev = pci_get_bus_and_slot(1, IXDP2800_SLAVE_ENET_DEVFN);
                        pci_remove_bus_device(dev);
+                       pci_dev_put(dev);
 
                        ixdp2800_master_enable_slave();
                        ixdp2800_master_wait_for_slave_bus_scan();
                } else {
-                       dev = pci_find_slot(1, IXDP2800_MASTER_ENET_DEVFN);
+                       dev = pci_get_bus_and_slot(1, IXDP2800_MASTER_ENET_DEVFN);
                        pci_remove_bus_device(dev);
+                       pci_dev_put(dev);
                }
        }
 
index af48cb5..aa26550 100644 (file)
@@ -241,11 +241,14 @@ void ixdp2x00_slave_pci_postinit(void)
        /*
         * Remove PMC device is there is one
         */
-       if((dev = pci_find_slot(1, IXDP2X00_PMC_DEVFN)))
+       if((dev = pci_get_bus_and_slot(1, IXDP2X00_PMC_DEVFN))) {
                pci_remove_bus_device(dev);
+               pci_dev_put(dev);
+       }
 
-       dev = pci_find_slot(0, IXDP2X00_21555_DEVFN);
+       dev = pci_get_bus_and_slot(0, IXDP2X00_21555_DEVFN);
        pci_remove_bus_device(dev);
+       pci_dev_put(dev);
 }
 
 /**************************************************************************