Skip to contentSkip to conversation

drivers/char/rocket.c : replace pci_find_device by

PATCH In review trem 2 participants 2 messages May 27, 2006 – May 29, 2006

Subsystems (2)
lore
Share & tools
lore

trem

author
#0 lore raw

PATCH 1/1 drivers/char/rocket.c : replace pci_find_device by

From: trem <[email protected]>

This patch simply change pci_find_device by pci_get_device, because pci_find_device is deprecated. No pci_dev_put is needed because the loop isn't broken, and pci_get_device decrement the counter of the device given as from parameter.

---

drivers/char/rocket.c +1 -1
index 7edc6a4..2682c8c 100644
@@ -2230,7 +2230,7 @@ static int __init init_PCI(int boards_fo
 	int count = 0;
 
 	/*  Work through the PCI device list, pulling out ours */
-	while ((dev = pci_find_device(PCI_VENDOR_ID_RP, PCI_ANY_ID, dev))) {
+	while ((dev = pci_get_device(PCI_VENDOR_ID_RP, PCI_ANY_ID, dev))) {
 		if (register_PCI(count + boards_found, dev))
 			count++;
 	}

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors

#1 lore raw
Quoted 8 lines · trem

From: trem <[email protected]>

This patch simply change pci_find_device by pci_get_device, because pci_find_device is deprecated. No pci_dev_put is needed because the loop isn't broken, and pci_get_device decrement the counter of the device given as from parameter.

No, this driver should be switched to the proper pci_register_driver() api instead.

thanks,

greg k-h
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors