[PATCH 4/4] x86/amd-iommu: use for_each_pci_dev

Chris Wright
2010-04-03T01:28:29Z

[-- Attachment #1: amd-iommu-use-for_each_pci_dev.patch --]
[-- Type: text/plain, Size: 684 bytes --]

Replace open coded version with for_each_pci_dev

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
arch/x86/kernel/amd_iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/x86/kernel/amd_iommu.c
+++ b/arch/x86/kernel/amd_iommu.c
@@ -2187,7 +2187,7 @@ static void prealloc_protection_domains(
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))