powerpc/pseries/eeh: Use for_each_pci_dev()
authorKulikov Vasiliy <segooon@gmail.com>
Sat, 3 Jul 2010 06:03:48 +0000 (06:03 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 9 Jul 2010 01:28:25 +0000 (11:28 +1000)
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>
arch/powerpc/platforms/pseries/eeh_cache.c

index 30b987b73c20cae978e57c3e8a6fb587b903af3a..8ed0d2d0e1b50b76630f2f1f3b65146bbb35d304 100644 (file)
@@ -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);