From 339d5d945e80691cde27ef08c9245d09fbc2845a Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Sat, 24 Jan 2004 16:56:48 +0000 Subject: [PATCH] pci_for_each_device fix for 2.6 from Bernd Porr --- include/linux/pci.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/pci.h b/include/linux/pci.h index a71891bc..600ae0b3 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -17,10 +17,10 @@ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) /* we should get rid of this, as it has been dropped from 2.6 */ -#define pci_for_each_dev(x) \ - for((x) = pci_dev_g(pci_devices.next), prefetch((x)->global_list.next); \ - x->global_list.next != &pci_devices; (x) = pci_dev_g((x)->global_list.next), \ - prefetch((x)->global_list.next)) +#define pci_for_each_dev(x) \ + for((x) = pci_find_device(PCI_ANY_ID,PCI_ANY_ID,NULL); \ + (x); \ + (x) = pci_find_device(PCI_ANY_ID,PCI_ANY_ID,(x))) #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0) /* XXX */ -- 2.26.2