[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1158330171.29932.50.camel@localhost.localdomain>
Date: Fri, 15 Sep 2006 15:22:51 +0100
From: Alan Cox <alan@...rguk.ukuu.org.uk>
To: raghavendra.koushik@...erion.com, jgarzik@...ox.com,
linux-kernel@...r.kernel.org
Subject: [PATCH] s2io: Switch to pci_get_device
We want the pci devices ref counted against hotplug.
Signed-off-by: Alan Cox <alan@...hat.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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists