Messages in this thread Patch in this message | | | Subject | [PATCH] s2io: Switch to pci_get_device | From | Alan Cox <> | Date | Fri, 15 Sep 2006 15:22:51 +0100 |
| |
We want the pci devices ref counted against hotplug.
Signed-off-by: Alan Cox <alan@redhat.com>
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.18-rc6-mm1/drivers/net/s2io.c linux-2.6.18-rc6-mm1/drivers/net/s2io.c --- linux.vanilla-2.6.18-rc6-mm1/drivers/net/s2io.c 2006-09-11 17:00:15.000000000 +0100 +++ linux-2.6.18-rc6-mm1/drivers/net/s2io.c 2006-09-14 16:46:11.000000000 +0100 @@ -855,9 +855,10 @@ 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; } } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |