Skip to content

Commit 8540504

Browse files
Yang Liwilldeacon
authored andcommitted
perf: qcom: Use devm_platform_get_and_ioremap_resource()
According to commit 890cc39 ("drivers: provide devm_platform_get_and_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Link: https://lore.kernel.org/r/20230315023108.36953-1-yang.lee@linux.alibaba.com Signed-off-by: Will Deacon <will@kernel.org>
1 parent d7f4679 commit 8540504

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/perf/qcom_l3_pmu.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -763,8 +763,7 @@ static int qcom_l3_cache_pmu_probe(struct platform_device *pdev)
763763
.capabilities = PERF_PMU_CAP_NO_EXCLUDE,
764764
};
765765

766-
memrc = platform_get_resource(pdev, IORESOURCE_MEM, 0);
767-
l3pmu->regs = devm_ioremap_resource(&pdev->dev, memrc);
766+
l3pmu->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &memrc);
768767
if (IS_ERR(l3pmu->regs))
769768
return PTR_ERR(l3pmu->regs);
770769

0 commit comments

Comments
 (0)