diff options
author | Cai Huoqing <caihuoqing@baidu.com> | 2021-09-07 16:51:50 +0800 |
---|---|---|
committer | Maxime Ripard <maxime@cerno.tech> | 2021-09-13 09:03:21 +0200 |
commit | e42f37591a3796c092c98a54df3ded6ce414fe9b (patch) | |
tree | b571c6bbb1c041c2469723741849f7876363aa56 | |
parent | cea6d174e7016ed93ab1f893233b280f73e7a995 (diff) | |
download | linux-stable-e42f37591a3796c092c98a54df3ded6ce414fe9b.tar.gz linux-stable-e42f37591a3796c092c98a54df3ded6ce414fe9b.tar.bz2 linux-stable-e42f37591a3796c092c98a54df3ded6ce414fe9b.zip |
clk: sunxi: clk-mod0: Make use of the helper function devm_platform_ioremap_resource()
Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately
Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20210907085151.4509-1-caihuoqing@baidu.com
-rw-r--r-- | drivers/clk/sunxi/clk-mod0.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/clk/sunxi/clk-mod0.c b/drivers/clk/sunxi/clk-mod0.c index f9d715ec9908..51800289ada9 100644 --- a/drivers/clk/sunxi/clk-mod0.c +++ b/drivers/clk/sunxi/clk-mod0.c @@ -88,14 +88,12 @@ CLK_OF_DECLARE_DRIVER(sun4i_a10_mod0, "allwinner,sun4i-a10-mod0-clk", static int sun4i_a10_mod0_clk_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; - struct resource *r; void __iomem *reg; if (!np) return -ENODEV; - r = platform_get_resource(pdev, IORESOURCE_MEM, 0); - reg = devm_ioremap_resource(&pdev->dev, r); + reg = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(reg)) return PTR_ERR(reg); |