From c6c6ca87b96680253b62c488c3d3a6824992e29a Mon Sep 17 00:00:00 2001 From: Bibek Kumar Patro Date: Thu, 19 Oct 2023 17:03:45 +0530 Subject: [PATCH] iommu: arm-smmu: fix the config check for testbus feature Currently the check for tcu-base used for testbus feature is wrapped under the ARM_SMMU_TESTBUS macro which holds the testbus register offset. This might cause smmu device probe failure even if CONFIG_ARM_SMMU_TESTBUS is disabled and there is no entry for tcu-base property in DT, hence replace this macro with CONFIG_ARM_SMMU_TESTBUS. Change-Id: I69fb65e072979a7fa2b5ea6653db608e1ec99504 Signed-off-by: Bibek Kumar Patro --- drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c index 89db96648b96..8c470488b215 100644 --- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c +++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c @@ -3168,7 +3168,7 @@ struct arm_smmu_device *qsmmuv500_create(struct arm_smmu_device *smmu, struct device *dev = smmu->dev; struct qsmmuv500_archdata *data; int ret; -#ifdef ARM_SMMU_TESTBUS +#if IS_ENABLED(CONFIG_ARM_SMMU_TESTBUS) struct platform_device *pdev; #endif @@ -3187,7 +3187,7 @@ struct arm_smmu_device *qsmmuv500_create(struct arm_smmu_device *smmu, qsmmuv500_log_outstanding_transactions); data->smmu.impl = impl; -#ifdef ARM_SMMU_TESTBUS +#if IS_ENABLED(CONFIG_ARM_SMMU_TESTBUS) pdev = to_platform_device(dev); data->tcu_base = devm_platform_ioremap_resource_byname(pdev, "tcu-base"); if (IS_ERR(data->tcu_base)) {