Commit 6f60f5cf authored by Hanna V. Linder's avatar Hanna V. Linder Committed by Linus Torvalds

[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: default avatarHanna Linder <hannal@us.ibm.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent cd019539
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment