Re: [KJ] [RFT 2.6] ebus.c replace pci_find_device withpci_get_device

From: Scott Feldman
Date: Sat Oct 09 2004 - 12:14:43 EST


On Fri, 2004-10-08 at 15:26, Hanna Linder wrote:
> @@ -275,7 +275,7 @@ void __init ebus_init(void)
> }
> }
>
> - pdev = pci_find_device(PCI_VENDOR_ID_SUN, PCI_DEVICE_ID_SUN_EBUS, 0);
> + pdev = pci_get_device(PCI_VENDOR_ID_SUN, PCI_DEVICE_ID_SUN_EBUS, 0);
> if (!pdev) {
> return;
> }
> @@ -342,7 +342,7 @@ void __init ebus_init(void)
> }
>
> next_ebus:
> - pdev = pci_find_device(PCI_VENDOR_ID_SUN,
> + pdev = pci_get_device(PCI_VENDOR_ID_SUN,
> PCI_DEVICE_ID_SUN_EBUS, pdev);
> if (!pdev)
> break;

If we can get out of the while() with pdev != NULL, then a
pci_dev_put(pdev) cleanup is required.

-scott

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/