summaryrefslogtreecommitdiffstats
path: root/drivers/clk/davinci/psc.c
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2019-10-14 16:44:07 +0200
committerStephen Boyd <sboyd@kernel.org>2019-10-17 01:17:14 +0200
commit1f8f3c6b35b235fea7fa72846a6b2c8af7596607 (patch)
treee57b20445c0357912cb8a9a539fd98217fec5ab0 /drivers/clk/davinci/psc.c
parentclk: hisilicon: use devm_platform_ioremap_resource() to simplify code (diff)
downloadlinux-1f8f3c6b35b235fea7fa72846a6b2c8af7596607.tar.xz
linux-1f8f3c6b35b235fea7fa72846a6b2c8af7596607.zip
clk: davinci: 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> Link: https://lkml.kernel.org/r/20191014144407.23264-1-yuehaibing@huawei.com Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/davinci/psc.c')
-rw-r--r--drivers/clk/davinci/psc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/clk/davinci/psc.c b/drivers/clk/davinci/psc.c
index 5b69e24a224f..7387e7f6276e 100644
--- a/drivers/clk/davinci/psc.c
+++ b/drivers/clk/davinci/psc.c
@@ -531,7 +531,6 @@ static int davinci_psc_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
const struct of_device_id *of_id;
const struct davinci_psc_init_data *init_data = NULL;
- struct resource *res;
void __iomem *base;
int ret;
@@ -546,8 +545,7 @@ static int davinci_psc_probe(struct platform_device *pdev)
return -EINVAL;
}
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- base = devm_ioremap_resource(dev, res);
+ base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(base))
return PTR_ERR(base);