diff options
-rw-r--r-- | drivers/iommu/arm-smmu.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index c8fc02f111c5..217581469f79 100644 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c | |||
@@ -2075,8 +2075,20 @@ static struct platform_driver arm_smmu_driver = { | |||
2075 | 2075 | ||
2076 | static int __init arm_smmu_init(void) | 2076 | static int __init arm_smmu_init(void) |
2077 | { | 2077 | { |
2078 | struct device_node *np; | ||
2078 | int ret; | 2079 | int ret; |
2079 | 2080 | ||
2081 | /* | ||
2082 | * Play nice with systems that don't have an ARM SMMU by checking that | ||
2083 | * an ARM SMMU exists in the system before proceeding with the driver | ||
2084 | * and IOMMU bus operation registration. | ||
2085 | */ | ||
2086 | np = of_find_matching_node(NULL, arm_smmu_of_match); | ||
2087 | if (!np) | ||
2088 | return 0; | ||
2089 | |||
2090 | of_node_put(np); | ||
2091 | |||
2080 | ret = platform_driver_register(&arm_smmu_driver); | 2092 | ret = platform_driver_register(&arm_smmu_driver); |
2081 | if (ret) | 2093 | if (ret) |
2082 | return ret; | 2094 | return ret; |