mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] i2o: Switch to pci_get API
@ 2006-09-25 22:42 Alan Cox
  0 siblings, 0 replies; only message in thread
From: Alan Cox @ 2006-09-25 22:42 UTC (permalink / raw)
  To: markus.lidel, akpm, linux-kernel

Use the safe ref-counted API for the bridge check

Signed-off-by: Alan Cox <alan@redhat.com>

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
--- linux.vanilla-2.6.18-mm1/drivers/message/i2o/pci.c	2006-09-25 12:08:45.000000000 +0100
+++ linux-2.6.18-mm1/drivers/message/i2o/pci.c	2006-09-25 12:21:39.164397568 +0100
@@ -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;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-09-25 22:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-25 22:42 [PATCH] i2o: Switch to pci_get API Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®