ChangeSet 1.1254.4.19, 2003/06/04 12:31:05-07:00, greg@kroah.com [PATCH] PCI: remove usage of pci_for_each_dev() in drivers/char/agp/generic.c drivers/char/agp/generic.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff -Nru a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c --- a/drivers/char/agp/generic.c Wed Jun 4 18:10:58 2003 +++ b/drivers/char/agp/generic.c Wed Jun 4 18:10:58 2003 @@ -462,12 +462,12 @@ //We need a function we pass an agp_device to. u32 agp_collect_device_status(u32 mode, u32 cmd) { - struct pci_dev *device; + struct pci_dev *device = NULL; u8 cap_ptr; u32 tmp; u32 agp3; - pci_for_each_dev(device) { + while ((device = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, device)) != NULL) { cap_ptr = pci_find_capability(device, PCI_CAP_ID_AGP); if (!cap_ptr) continue; @@ -502,14 +502,14 @@ void agp_device_command(u32 command, int agp_v3) { - struct pci_dev *device; + struct pci_dev *device = NULL; int mode; mode = command & 0x7; if (agp_v3) mode *= 4; - pci_for_each_dev(device) { + while ((device = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, device)) != NULL) { u8 agp = pci_find_capability(device, PCI_CAP_ID_AGP); if (!agp) continue;