summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKulikov Vasiliy <segooon@gmail.com>2010-07-03 10:03:48 +0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-07-09 05:28:25 +0400
commit6901c6cca1271d1724fc15e9937e0820e2d2fbd5 (patch)
tree9c2de6a71fd1cc8434dfb4b9c4802493078a22e8
parent4455b1191cabbf7ecada800b7cfeccddb0af2b3a (diff)
downloadlinux-6901c6cca1271d1724fc15e9937e0820e2d2fbd5.tar.xz
powerpc/pseries/eeh: Use for_each_pci_dev()
Use for_each_pci_dev() to simplify the code. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r--arch/powerpc/platforms/pseries/eeh_cache.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/pseries/eeh_cache.c b/arch/powerpc/platforms/pseries/eeh_cache.c
index 30b987b73c20..8ed0d2d0e1b5 100644
--- a/arch/powerpc/platforms/pseries/eeh_cache.c
+++ b/arch/powerpc/platforms/pseries/eeh_cache.c
@@ -288,8 +288,7 @@ void __init pci_addr_cache_build(void)
spin_lock_init(&pci_io_addr_cache_root.piar_lock);
- while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
-
+ for_each_pci_dev(dev) {
pci_addr_cache_insert_device(dev);
dn = pci_device_to_OF_node(dev);