Skip to contentSkip to conversation

i2o: Switch to pci_get API

PATCH New Alan Cox 1 participant 1 message Sep 25, 2006

lore
Share & tools
lore

Alan Cox

author
#0 lore raw

PATCH 1/1 i2o: Switch to pci_get API

Use the safe ref-counted API for the bridge check

drivers/message/i2o/pci.c +4 -3
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.18-mm1/drivers/message/i2o/pci.c linux-2.6.18-mm1/drivers/message/i2o/pci.c
@@ -372,12 +372,13 @@
 		 * Expose the ship behind i960 for initialization, or it will
 		 * failed
 		 */
-		i960 =
-		    pci_find_slot(c->pdev->bus->number,
+		i960 = pci_get_slot(c->pdev->bus,
 				  PCI_DEVFN(PCI_SLOT(c->pdev->devfn), 0));
 
-		if (i960)
+		if (i960) {
 			pci_write_config_word(i960, 0x42, 0);
+			pci_dev_put(i960);
+		}
 
 		c->promise = 1;
 		c->limit_sectors = 1;