Skip to contentSkip to conversation

vioc_irq: Switch to pci refcount safe API

PATCH New Alan Cox 1 participant 1 message Apr 23, 2007 Network drivers

lore
Share & tools
lore

Alan Cox

author
#0 lore raw

PATCH 1/1 vioc_irq: Switch to pci refcount safe API

drivers/net/vioc/vioc_irq.c +3 -1
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.21-rc6-mm1/drivers/net/vioc/vioc_irq.c linux-2.6.21-rc6-mm1/drivers/net/vioc/vioc_irq.c
@@ -233,8 +233,10 @@
 
 	devfn = PCI_DEVFN(slot, func);
 	/* Find pci_dev structure of the requested function */
-	dev = pci_find_slot(dev_in->bus->number, devfn);
+	dev = pci_get_bus_and_slot(dev_in->bus->number, devfn);
 	if (dev) {
+		int irq = dev->irq
+		pci_dev_put(dev);
 		return irq;
 	} else {
 		return VIOC_IRQ_NONE;