mn10300: use for_each_pci_dev to simplify the code
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Fri, 22 Feb 2013 00:42:03 +0000 (16:42 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 22 Feb 2013 01:22:16 +0000 (17:22 -0800)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/mn10300/unit-asb2305/pci-irq.c

index 91212ea..77439da 100644 (file)
@@ -29,7 +29,7 @@ void __init pcibios_fixup_irqs(void)
        struct pci_dev *dev = NULL;
        u8 line, pin;
 
-       while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
+       for_each_pci_dev(dev) {
                pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
                if (pin) {
                        dev->irq = XIRQ1;