From 26d36b642e2f024019f94819284a11273807571d Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Fri, 15 Sep 2006 15:22:51 +0100 Subject: [PATCH] s2io: Switch to pci_get_device We want the pci devices ref counted against hotplug. Signed-off-by: Alan Cox Signed-off-by: Jeff Garzik --- drivers/net/s2io.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/net') diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index 542059107538..d579a44aab5c 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c @@ -855,9 +855,10 @@ static int s2io_verify_pci_mode(nic_t *nic) static int s2io_on_nec_bridge(struct pci_dev *s2io_pdev) { struct pci_dev *tdev = NULL; - while ((tdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, tdev)) != NULL) { - if ((tdev->vendor == NEC_VENID) && (tdev->device == NEC_DEVID)){ + while ((tdev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, tdev)) != NULL) { + if (tdev->vendor == NEC_VENID && tdev->device == NEC_DEVID) { if (tdev->bus == s2io_pdev->bus->parent) + pci_dev_put(tdev); return 1; } } -- cgit v1.2.3