diff options
author | Cai Huoqing <caihuoqing@baidu.com> | 2021-09-07 10:52:57 +0200 |
---|---|---|
committer | Maxime Ripard <maxime@cerno.tech> | 2021-09-13 09:03:23 +0200 |
commit | 1f38b45b115d5f47154d615fe7206783f6a788f4 (patch) | |
tree | d8eb9480c8fa8606db71f7c33cd8d9cc18cf7482 /drivers/clk | |
parent | clk: sunxi-ng: ccu-sun9i-a80-usb: Make use of the helper function devm_platfo... (diff) | |
download | linux-1f38b45b115d5f47154d615fe7206783f6a788f4.tar.xz linux-1f38b45b115d5f47154d615fe7206783f6a788f4.zip |
clk: sunxi: sun6i-apb0: 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/20210907085257.4968-1-caihuoqing@baidu.com
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/sunxi/clk-sun6i-apb0.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/clk/sunxi/clk-sun6i-apb0.c b/drivers/clk/sunxi/clk-sun6i-apb0.c index 10f70c35c265..f80c67bafe38 100644 --- a/drivers/clk/sunxi/clk-sun6i-apb0.c +++ b/drivers/clk/sunxi/clk-sun6i-apb0.c @@ -32,12 +32,10 @@ static int sun6i_a31_apb0_clk_probe(struct platform_device *pdev) struct device_node *np = pdev->dev.of_node; const char *clk_name = np->name; const char *clk_parent; - struct resource *r; void __iomem *reg; struct clk *clk; - 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); |