Skip to content

Commit

Permalink
[PATCH] s2io: Switch to pci_get_device
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alan Cox authored and Jeff Garzik committed Sep 19, 2006
1 parent b921c3d commit 26d36b6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/net/s2io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 26d36b6

Please sign in to comment.