mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFT 2.6] generic.c: replace pci_find_device with pci_get_device
@ 2004-10-20 18:51 Hanna Linder
  2004-10-20 22:02 ` [KJ] " Matthew Wilcox
  0 siblings, 1 reply; 3+ messages in thread
From: Hanna Linder @ 2004-10-20 18:51 UTC (permalink / raw)
  To: lkml, kernel-janitors; +Cc: Hanna Linder, greg, davej

As pci_find_device is going away soon I have converted this file to use
pci_get_device instead. I have compile tested it. If anyone has this hardware
and could test it that would be great.

Hanna Linder
IBM Linux Technology Center

Signed-off-by: Hanna Linder <hannal@us.ibm.com>
---

diff -Nrup linux-2.6.9cln/drivers/char/agp/generic.c linux-2.6.9patch/drivers/char/agp/generic.c
--- linux-2.6.9cln/drivers/char/agp/generic.c	2004-10-18 16:35:52.000000000 -0700
+++ linux-2.6.9patch/drivers/char/agp/generic.c	2004-10-18 17:20:56.000000000 -0700
@@ -507,7 +507,7 @@ u32 agp_collect_device_status(u32 mode, 
 	u32 tmp;
 	u32 agp3;
 
-	while ((device = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, device)) != NULL) {
+	for_each_pci_dev(device) {
 		cap_ptr = pci_find_capability(device, PCI_CAP_ID_AGP);
 		if (!cap_ptr)
 			continue;
@@ -551,7 +551,7 @@ void agp_device_command(u32 command, int
 	if (agp_v3)
 		mode *= 4;
 
-	while ((device = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, device)) != NULL) {
+	for_each_pci_dev(device) {
 		u8 agp = pci_find_capability(device, PCI_CAP_ID_AGP);
 		if (!agp)
 			continue;



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-10-20 22:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-20 18:51 [RFT 2.6] generic.c: replace pci_find_device with pci_get_device Hanna Linder
2004-10-20 22:02 ` [KJ] " Matthew Wilcox
2004-10-20 22:07   ` Dave Jones

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

Powered by JetHome