diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-10-14 17:44:07 +0300 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2019-10-17 02:17:14 +0300 |
commit | 1f8f3c6b35b235fea7fa72846a6b2c8af7596607 (patch) | |
tree | e57b20445c0357912cb8a9a539fd98217fec5ab0 /drivers/clk/davinci/pll.c | |
parent | 75cc0a123c90c8e3bfd8d279395d0bd558670424 (diff) | |
download | linux-1f8f3c6b35b235fea7fa72846a6b2c8af7596607.tar.xz |
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/pll.c')
-rw-r--r-- | drivers/clk/davinci/pll.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/clk/davinci/pll.c b/drivers/clk/davinci/pll.c index 1ac11b6a47a3..8a23d5dfd1f8 100644 --- a/drivers/clk/davinci/pll.c +++ b/drivers/clk/davinci/pll.c @@ -910,7 +910,6 @@ static int davinci_pll_probe(struct platform_device *pdev) struct davinci_pll_platform_data *pdata; const struct of_device_id *of_id; davinci_pll_init pll_init = NULL; - struct resource *res; void __iomem *base; of_id = of_match_device(davinci_pll_of_match, dev); @@ -930,8 +929,7 @@ static int davinci_pll_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); |