Skip to content

Commit 7bed704

Browse files
larsclausenbebarino
authored andcommitted
clk: axs10x: Use managed of_clk_add_hw_provider()
Use the managed `devm_of_clk_add_hw_provider()` instead of `of_clk_add_hw_provider()`. This makes sure the provider gets automatically removed on unbind and allows to completely eliminate the drivers `remove()` callback. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20230410014502.27929-3-lars@metafoo.de Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent f042ebc commit 7bed704

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

drivers/clk/axs10x/pll_clock.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -253,13 +253,8 @@ static int axs10x_pll_clk_probe(struct platform_device *pdev)
253253
return ret;
254254
}
255255

256-
return of_clk_add_hw_provider(dev->of_node, of_clk_hw_simple_get,
257-
&pll_clk->hw);
258-
}
259-
260-
static void axs10x_pll_clk_remove(struct platform_device *pdev)
261-
{
262-
of_clk_del_provider(pdev->dev.of_node);
256+
return devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get,
257+
&pll_clk->hw);
263258
}
264259

265260
static void __init of_axs10x_pll_clk_setup(struct device_node *node)
@@ -331,7 +326,6 @@ static struct platform_driver axs10x_pll_clk_driver = {
331326
.of_match_table = axs10x_pll_clk_id,
332327
},
333328
.probe = axs10x_pll_clk_probe,
334-
.remove_new = axs10x_pll_clk_remove,
335329
};
336330
builtin_platform_driver(axs10x_pll_clk_driver);
337331

0 commit comments

Comments
 (0)