From: Kulikov Vasiliy Date: Sat, 3 Jul 2010 16:03:51 +0000 (-0400) Subject: x86/amd-iommu: Use for_each_pci_dev() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6c54aabd5e687092557f4881ce2d4013b971f293;p=linux-beck.git x86/amd-iommu: Use for_each_pci_dev() Use for_each_pci_dev() to simplify the code. Signed-off-by: Kulikov Vasiliy Signed-off-by: Joerg Roedel --- diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index 0d20286d78c6..29dd3b9f2f09 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c @@ -2609,8 +2609,7 @@ int __init amd_iommu_init_passthrough(void) pt_domain->mode |= PAGE_MODE_NONE; - while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { - + for_each_pci_dev(dev) { if (!check_device(&dev->dev)) continue;