Skip to content

Commit 68a49d3

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

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/clk/sunxi/clk-sun6i-ar100.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,10 @@ static DEFINE_SPINLOCK(sun6i_ar100_lock);
7171
static int sun6i_a31_ar100_clk_probe(struct platform_device *pdev)
7272
{
7373
struct device_node *np = pdev->dev.of_node;
74-
struct resource *r;
7574
void __iomem *reg;
7675
struct clk *clk;
7776

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);
8078
if (IS_ERR(reg))
8179
return PTR_ERR(reg);
8280

0 commit comments

Comments
 (0)