Commit f011856c authored by Jay Chen's avatar Jay Chen Committed by Will Deacon

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: default avatarJay Chen <jkchen@linux.alibaba.com>
Link: https://lore.kernel.org/r/20200706112246.92220-2-jkchen@linux.alibaba.comSigned-off-by: default avatarWill Deacon <will@kernel.org>
parent 9ebcfadb
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment