[PATCH] s2io: Switch to pci_get_device

We want the pci devices ref counted against hotplug.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
Alan Cox 2006-09-15 15:22:51 +01:00 committed by Jeff Garzik
parent b921c3d8b6
commit 26d36b642e

View File

@ -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;
}
}