Skip to content

Commit f011856

Browse files
Jay Chenwilldeacon
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent 9ebcfad commit f011856

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/perf/arm_smmuv3_pmu.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -755,8 +755,7 @@ static int smmu_pmu_probe(struct platform_device *pdev)
755755
.capabilities = PERF_PMU_CAP_NO_EXCLUDE,
756756
};
757757

758-
res_0 = platform_get_resource(pdev, IORESOURCE_MEM, 0);
759-
smmu_pmu->reg_base = devm_ioremap_resource(dev, res_0);
758+
smmu_pmu->reg_base = devm_platform_get_and_ioremap_resource(pdev, 0, &res_0);
760759
if (IS_ERR(smmu_pmu->reg_base))
761760
return PTR_ERR(smmu_pmu->reg_base);
762761

0 commit comments

Comments
 (0)