Skip to content

Commit ac57ffb

Browse files
caihuoqing1990mripard
authored andcommitted
clk: sunxi: sun6i-apb0-gates: 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 1f38b45 commit ac57ffb

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/clk/sunxi/clk-sun6i-apb0-gates.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ static int sun6i_a31_apb0_gates_clk_probe(struct platform_device *pdev)
4040
const struct gates_data *data;
4141
const char *clk_parent;
4242
const char *clk_name;
43-
struct resource *r;
4443
void __iomem *reg;
4544
int ngates;
4645
int i;
@@ -53,8 +52,7 @@ static int sun6i_a31_apb0_gates_clk_probe(struct platform_device *pdev)
5352
if (!data)
5453
return -ENODEV;
5554

56-
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
57-
reg = devm_ioremap_resource(&pdev->dev, r);
55+
reg = devm_platform_ioremap_resource(pdev, 0);
5856
if (IS_ERR(reg))
5957
return PTR_ERR(reg);
6058

0 commit comments

Comments
 (0)