iommu/vt-d: Make identity_mapping() take struct device not struct pci_dev
authorDavid Woodhouse <David.Woodhouse@intel.com>
Sun, 9 Mar 2014 21:03:28 +0000 (14:03 -0700)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 24 Mar 2014 14:07:48 +0000 (14:07 +0000)
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/iommu/intel-iommu.c

index 5c89eb7ae39884c851d3763e97a0e1ce7e40f005..1030230d485118e3257382108e9c6e8b47eb39d8 100644 (file)
@@ -2439,14 +2439,14 @@ static int __init si_domain_init(int hw)
        return 0;
 }
 
-static int identity_mapping(struct pci_dev *pdev)
+static int identity_mapping(struct device *dev)
 {
        struct device_domain_info *info;
 
        if (likely(!iommu_identity_mapping))
                return 0;
 
-       info = pdev->dev.archdata.iommu;
+       info = dev->archdata.iommu;
        if (info && info != DUMMY_DEVICE_DOMAIN_INFO)
                return (info->domain == si_domain);
 
@@ -2903,7 +2903,7 @@ static int iommu_no_mapping(struct device *dev)
                return 0;
 
        pdev = to_pci_dev(dev);
-       found = identity_mapping(pdev);
+       found = identity_mapping(dev);
        if (found) {
                if (iommu_should_identity_map(pdev, 0))
                        return 1;