diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2006-09-15 10:22:51 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-09-19 00:05:45 -0400 |
commit | 26d36b642e2f024019f94819284a11273807571d (patch) | |
tree | cce04aa045ad79dc63fcac3f4652d338218dc66a /drivers/net | |
parent | b921c3d8b64fe12948088be049785de49be50990 (diff) |
[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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/s2io.c | 5 |
1 files changed, 3 insertions, 2 deletions
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) | |||
855 | static int s2io_on_nec_bridge(struct pci_dev *s2io_pdev) | 855 | static int s2io_on_nec_bridge(struct pci_dev *s2io_pdev) |
856 | { | 856 | { |
857 | struct pci_dev *tdev = NULL; | 857 | struct pci_dev *tdev = NULL; |
858 | while ((tdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, tdev)) != NULL) { | 858 | while ((tdev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, tdev)) != NULL) { |
859 | if ((tdev->vendor == NEC_VENID) && (tdev->device == NEC_DEVID)){ | 859 | if (tdev->vendor == NEC_VENID && tdev->device == NEC_DEVID) { |
860 | if (tdev->bus == s2io_pdev->bus->parent) | 860 | if (tdev->bus == s2io_pdev->bus->parent) |
861 | pci_dev_put(tdev); | ||
861 | return 1; | 862 | return 1; |
862 | } | 863 | } |
863 | } | 864 | } |