From: Frank Mori Hess Date: Sat, 24 Jan 2004 16:56:48 +0000 (+0000) Subject: pci_for_each_device fix for 2.6 from Bernd Porr X-Git-Tag: r0_7_69~129 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=339d5d945e80691cde27ef08c9245d09fbc2845a;p=comedi.git pci_for_each_device fix for 2.6 from Bernd Porr --- 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 */