Skip to content

Commit e65d38e

Browse files
caihuoqing1990mripard
authored andcommitted
clk: sunxi: sun8i-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 <[email protected]> Signed-off-by: Maxime Ripard <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 68a49d3 commit e65d38e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/clk/sunxi/clk-sun8i-apb0.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,10 @@ CLK_OF_DECLARE_DRIVER(sun8i_a23_apb0, "allwinner,sun8i-a23-apb0-clk",
8787
static int sun8i_a23_apb0_clk_probe(struct platform_device *pdev)
8888
{
8989
struct device_node *np = pdev->dev.of_node;
90-
struct resource *r;
9190
void __iomem *reg;
9291
struct clk *clk;
9392

94-
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
95-
reg = devm_ioremap_resource(&pdev->dev, r);
93+
reg = devm_platform_ioremap_resource(pdev, 0);
9694
if (IS_ERR(reg))
9795
return PTR_ERR(reg);
9896

0 commit comments

Comments
 (0)