summaryrefslogtreecommitdiff
path: root/drivers/perf
diff options
context:
space:
mode:
authorJay Chen <jkchen@linux.alibaba.com>2020-07-06 14:22:45 +0300
committerWill Deacon <will@kernel.org>2020-07-13 18:20:44 +0300
commitf011856ce7b600fdc2d1102d56873b787ff6d1bb (patch)
tree0a9b248cefcc1d711b1986da855736901942ed93 /drivers/perf
parent9ebcfadb0610322ac537dd7aa5d9cbc2b2894c68 (diff)
downloadlinux-f011856ce7b600fdc2d1102d56873b787ff6d1bb.tar.xz
perf/smmuv3: To simplify code for ioremap page in pmcg
Use the devm_platform_get_and_ioremap_resource to simplify the code a bit. Signed-off-by: Jay Chen <jkchen@linux.alibaba.com> Link: https://lore.kernel.org/r/20200706112246.92220-2-jkchen@linux.alibaba.com Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'drivers/perf')
-rw-r--r--drivers/perf/arm_smmuv3_pmu.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/perf/arm_smmuv3_pmu.c b/drivers/perf/arm_smmuv3_pmu.c
index 48e28ef93a70..2d09f3e47d12 100644
--- a/drivers/perf/arm_smmuv3_pmu.c
+++ b/drivers/perf/arm_smmuv3_pmu.c
@@ -755,8 +755,7 @@ static int smmu_pmu_probe(struct platform_device *pdev)
.capabilities = PERF_PMU_CAP_NO_EXCLUDE,
};
- res_0 = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- smmu_pmu->reg_base = devm_ioremap_resource(dev, res_0);
+ smmu_pmu->reg_base = devm_platform_get_and_ioremap_resource(pdev, 0, &res_0);
if (IS_ERR(smmu_pmu->reg_base))
return PTR_ERR(smmu_pmu->reg_base);