diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-09-09 03:22:57 +0200 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2019-10-01 13:35:44 +0200 |
commit | c8b0de762e0b7cf9f51ad13b19bd279809317f37 (patch) | |
tree | f97c87a0b4c3bf3b93ca0f58580c416762caf7b8 /drivers/perf | |
parent | perf/arm-cci: use devm_platform_ioremap_resource() to simplify code (diff) | |
download | linux-c8b0de762e0b7cf9f51ad13b19bd279809317f37.tar.xz linux-c8b0de762e0b7cf9f51ad13b19bd279809317f37.zip |
perf/smmuv3: use devm_platform_ioremap_resource() to simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'drivers/perf')
-rw-r--r-- | drivers/perf/arm_smmuv3_pmu.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/perf/arm_smmuv3_pmu.c b/drivers/perf/arm_smmuv3_pmu.c index abcf54f7d19c..773128f411f1 100644 --- a/drivers/perf/arm_smmuv3_pmu.c +++ b/drivers/perf/arm_smmuv3_pmu.c @@ -727,7 +727,7 @@ static void smmu_pmu_get_acpi_options(struct smmu_pmu *smmu_pmu) static int smmu_pmu_probe(struct platform_device *pdev) { struct smmu_pmu *smmu_pmu; - struct resource *res_0, *res_1; + struct resource *res_0; u32 cfgr, reg_size; u64 ceid_64[2]; int irq, err; @@ -764,8 +764,7 @@ static int smmu_pmu_probe(struct platform_device *pdev) /* Determine if page 1 is present */ if (cfgr & SMMU_PMCG_CFGR_RELOC_CTRS) { - res_1 = platform_get_resource(pdev, IORESOURCE_MEM, 1); - smmu_pmu->reloc_base = devm_ioremap_resource(dev, res_1); + smmu_pmu->reloc_base = devm_platform_ioremap_resource(pdev, 1); if (IS_ERR(smmu_pmu->reloc_base)) return PTR_ERR(smmu_pmu->reloc_base); } else { |