diff options
| author | Hanna V. Linder <hannal@us.ibm.com> | 2004-10-24 20:24:04 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-10-24 20:24:04 -0700 |
| commit | 6f60f5cfdd2a51b82479d8285ee2344e74ccb098 (patch) | |
| tree | 7551cce0ea79d553c3902ad98e695c080a56a66a /include/linux | |
| parent | cd019539b6d5e1774f2df5ec2667b2508ef69a15 (diff) | |
[PATCH] add 'for_each_pci_dev()' helper macro
Jeff already mistakenly sent in a user of this macro, so we should
probably add the macro itself too.
Signed-off-by: Hanna Linder <hannal@us.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/pci.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index 5d806aca0b30..e7fa282ddede 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -547,6 +547,7 @@ struct pci_dev { #define pci_dev_g(n) list_entry(n, struct pci_dev, global_list) #define pci_dev_b(n) list_entry(n, struct pci_dev, bus_list) #define to_pci_dev(n) container_of(n, struct pci_dev, dev) +#define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL) /* * For PCI devices, the region numbers are assigned this way: |
