Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Cai Huoqing and committed by
Maxime Ripard
e42f3759 cea6d174

+1 -3
+1 -3
drivers/clk/sunxi/clk-mod0.c
··· 88 88 static int sun4i_a10_mod0_clk_probe(struct platform_device *pdev) 89 89 { 90 90 struct device_node *np = pdev->dev.of_node; 91 - struct resource *r; 92 91 void __iomem *reg; 93 92 94 93 if (!np) 95 94 return -ENODEV; 96 95 97 - r = platform_get_resource(pdev, IORESOURCE_MEM, 0); 98 - reg = devm_ioremap_resource(&pdev->dev, r); 96 + reg = devm_platform_ioremap_resource(pdev, 0); 99 97 if (IS_ERR(reg)) 100 98 return PTR_ERR(reg); 101 99