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

clk: sunxi: sun6i-ar100: 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/20210907085312.5070-1-caihuoqing@baidu.com

authored by

Cai Huoqing and committed by
Maxime Ripard
68a49d35 ac57ffb0

+1 -3
+1 -3
drivers/clk/sunxi/clk-sun6i-ar100.c
··· 71 71 static int sun6i_a31_ar100_clk_probe(struct platform_device *pdev) 72 72 { 73 73 struct device_node *np = pdev->dev.of_node; 74 - struct resource *r; 75 74 void __iomem *reg; 76 75 struct clk *clk; 77 76 78 - r = platform_get_resource(pdev, IORESOURCE_MEM, 0); 79 - reg = devm_ioremap_resource(&pdev->dev, r); 77 + reg = devm_platform_ioremap_resource(pdev, 0); 80 78 if (IS_ERR(reg)) 81 79 return PTR_ERR(reg); 82 80