summaryrefslogtreecommitdiff
path: root/drivers/perf
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2019-09-06 17:40:14 +0300
committerWill Deacon <will@kernel.org>2019-10-01 14:28:47 +0300
commit504db0f82660898cbb76478cb2eaee46817c85b8 (patch)
tree2872b1da647a02375b9a982833ef8f786ba6906c /drivers/perf
parent1c8d96b41d8b05ed9dbc2bea03edf878f544f93e (diff)
downloadlinux-504db0f82660898cbb76478cb2eaee46817c85b8.tar.xz
perf/arm-cci: 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-cci.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/perf/arm-cci.c b/drivers/perf/arm-cci.c
index 8f8606b9bc9e..1b8e337a29ca 100644
--- a/drivers/perf/arm-cci.c
+++ b/drivers/perf/arm-cci.c
@@ -1642,7 +1642,6 @@ static struct cci_pmu *cci_pmu_alloc(struct device *dev)
static int cci_pmu_probe(struct platform_device *pdev)
{
- struct resource *res;
struct cci_pmu *cci_pmu;
int i, ret, irq;
@@ -1650,8 +1649,7 @@ static int cci_pmu_probe(struct platform_device *pdev)
if (IS_ERR(cci_pmu))
return PTR_ERR(cci_pmu);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- cci_pmu->base = devm_ioremap_resource(&pdev->dev, res);
+ cci_pmu->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(cci_pmu->base))
return -ENOMEM;