diff options
author | Graeme Gregory <graeme.gregory@linaro.org> | 2016-10-07 14:51:19 +0100 |
---|---|---|
committer | Graeme Gregory <graeme.gregory@linaro.org> | 2016-10-07 14:51:19 +0100 |
commit | ff9cde660c4e855e65ade8b1fef3d8fcd87039dd (patch) | |
tree | 89ac07e61b10b89fa3fea07cae879c0b1dc2ede7 | |
parent | 79476c231e05a474ced8ad1ada308a591482411e (diff) |
FIXUP: fix error when multiple iommuerp-topic-smmu-20161026.0
From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
-rw-r--r-- | drivers/iommu/arm-smmu-v3.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c index 03f89adf72b2..4777d3ccb4d2 100644 --- a/drivers/iommu/arm-smmu-v3.c +++ b/drivers/iommu/arm-smmu-v3.c @@ -2693,16 +2693,17 @@ static int arm_smmu_device_probe(struct platform_device *pdev) #ifdef CONFIG_PCI pci_request_acs(); - ret = bus_set_iommu(&pci_bus_type, &arm_smmu_ops); - if (ret) - return ret; + if (!iommu_present(&pci_bus_type)) + bus_set_iommu(&pci_bus_type, &arm_smmu_ops); #endif #ifdef CONFIG_ARM_AMBA - ret = bus_set_iommu(&amba_bustype, &arm_smmu_ops); - if (ret) - return ret; + if (!iommu_present(&amba_bustype)) + bus_set_iommu(&amba_bustype, &arm_smmu_ops); #endif - return bus_set_iommu(&platform_bus_type, &arm_smmu_ops); + if (!iommu_present(&platform_bus_type)) + bus_set_iommu(&platform_bus_type, &arm_smmu_ops); + + return 0; } static int arm_smmu_device_remove(struct platform_device *pdev) |