Skip to contentSkip to conversation

ebus.c replace pci_find_device with pci_get_device

PATCH In review [email protected] 2 participants 2 messages Jan 10, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ebus.c replace pci_find_device with pci_get_device

As pci_find_device is going away I've replaced it with pci_get_device. If someone with a Sparc64 system could test it I would appreciate it. Thanks.

Hanna Linder
IBM Linux Technology Center

---

---

 kj-domen/arch/sparc64/kernel/ebus.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
arch/sparc64/kernel/ebus.c renamed from arch/sparc64/kernel/ebus.c~remove-pci-find-device-arch_sparc64_kernel_ebus +1 -1
diff -puN arch/sparc64/kernel/ebus.c~remove-pci-find-device-arch_sparc64_kernel_ebus arch/sparc64/kernel/ebus.c
@@ -528,7 +528,7 @@ static struct pci_dev *find_next_ebus(st
 	struct pci_dev *pdev = start;
 
 	do {
-		pdev = pci_find_device(PCI_VENDOR_ID_SUN, PCI_ANY_ID, pdev);
+		pdev = pci_get_device(PCI_VENDOR_ID_SUN, PCI_ANY_ID, pdev);
 		if (pdev &&
 		    (pdev->device = PCI_DEVICE_ID_SUN_EBUS ||
 		     pdev->device = PCI_DEVICE_ID_SUN_RIO_EBUS))

_

#1 lore raw
Quoted 3 lines · On Mon, 10 Jan 2005 18:48:51 +0100 [email protected] wrote:

As pci_find_device is going away I've replaced it with pci_get_device. If someone with a Sparc64 system could test it I would appreciate it. Thanks.

You need to add the appropriate pci_dev_put() calls if you make this change since pci_get_device() obtains a reference count to the device object.