]> err.no Git - linux-2.6/commitdiff
[PATCH] x86: remove last two pci_find offenders in the core code
authorAlan Cox <alan@lxorguk.ukuu.org.uk>
Thu, 7 Dec 2006 01:14:03 +0000 (02:14 +0100)
committerAndi Kleen <andi@basil.nowhere.org>
Thu, 7 Dec 2006 01:14:03 +0000 (02:14 +0100)
Resending as I believe the discussion about them established they were
correct.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
arch/i386/pci/irq.c
arch/x86_64/kernel/pci-calgary.c

index e65551cd82162522ed0dfd919cb6e653f6e1b7b5..f2cb942f828197ae61b36c2314cc8b2fcee75446 100644 (file)
@@ -764,7 +764,7 @@ static void __init pirq_find_router(struct irq_router *r)
        DBG(KERN_DEBUG "PCI: Attempting to find IRQ router for %04x:%04x\n",
            rt->rtr_vendor, rt->rtr_device);
 
-       pirq_router_dev = pci_find_slot(rt->rtr_bus, rt->rtr_devfn);
+       pirq_router_dev = pci_get_bus_and_slot(rt->rtr_bus, rt->rtr_devfn);
        if (!pirq_router_dev) {
                DBG(KERN_DEBUG "PCI: Interrupt router not found at "
                        "%02x:%02x\n", rt->rtr_bus, rt->rtr_devfn);
@@ -784,6 +784,8 @@ static void __init pirq_find_router(struct irq_router *r)
                pirq_router_dev->vendor,
                pirq_router_dev->device,
                pci_name(pirq_router_dev));
+
+       /* The device remains referenced for the kernel lifetime */
 }
 
 static struct irq_info *pirq_get_info(struct pci_dev *dev)
index 37a770859e7180ae38e06c22d6064fbe1a4ebeab..d2ea87a95268236436577db0bfd84c5922dc36ed 100644 (file)
@@ -921,7 +921,7 @@ static int __init calgary_init(void)
 
 error:
        do {
-               dev = pci_find_device_reverse(PCI_VENDOR_ID_IBM,
+               dev = pci_get_device_reverse(PCI_VENDOR_ID_IBM,
                                              PCI_DEVICE_ID_IBM_CALGARY,
                                              dev);
                if (!dev)