diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2023-04-09 18:44:54 -0700 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2023-04-10 12:45:12 -0700 |
commit | 7bed704f803cabfd7d5c3e92b0e8ecd29eefe5a3 (patch) | |
tree | da136c55f5796eaa69a4ff2b53e99b3f768eabc6 /drivers/clk | |
parent | f042ebcfccaa9761b4f36ffa33b0663d6f6eaaa4 (diff) |
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>
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/axs10x/pll_clock.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/clk/axs10x/pll_clock.c b/drivers/clk/axs10x/pll_clock.c index dbbfa12e530d..242bf5d75bab 100644 --- a/drivers/clk/axs10x/pll_clock.c +++ b/drivers/clk/axs10x/pll_clock.c @@ -253,13 +253,8 @@ static int axs10x_pll_clk_probe(struct platform_device *pdev) return ret; } - return of_clk_add_hw_provider(dev->of_node, of_clk_hw_simple_get, - &pll_clk->hw); -} - -static void axs10x_pll_clk_remove(struct platform_device *pdev) -{ - of_clk_del_provider(pdev->dev.of_node); + return devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get, + &pll_clk->hw); } static void __init of_axs10x_pll_clk_setup(struct device_node *node) @@ -331,7 +326,6 @@ static struct platform_driver axs10x_pll_clk_driver = { .of_match_table = axs10x_pll_clk_id, }, .probe = axs10x_pll_clk_probe, - .remove_new = axs10x_pll_clk_remove, }; builtin_platform_driver(axs10x_pll_clk_driver); |