x86/amd-iommu: use for_each_pci_dev
authorChris Wright <chrisw@sous-sol.org>
Sat, 3 Apr 2010 01:27:55 +0000 (18:27 -0700)
committerJoerg Roedel <joerg.roedel@amd.com>
Wed, 7 Apr 2010 09:51:34 +0000 (11:51 +0200)
Replace open coded version with for_each_pci_dev

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
arch/x86/kernel/amd_iommu.c

index 71dfc0a..4949568 100644 (file)
@@ -2187,7 +2187,7 @@ static void prealloc_protection_domains(void)
        struct dma_ops_domain *dma_dom;
        u16 devid;
 
-       while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
+       for_each_pci_dev(dev) {
 
                /* Do we handle this device? */
                if (!check_device(&dev->dev))