diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2023-04-10 03:44:56 +0200 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2023-04-10 21:45:12 +0200 |
commit | 56d144d0344aaa3810e2d18229f315480fc72a89 (patch) | |
tree | 5571927bdcc5a15f1d28ebc561c763123fdc5749 /drivers/clk/clk-hsdk-pll.c | |
parent | clk: cdce706: Use managed `of_clk_add_hw_provider()` (diff) | |
download | linux-56d144d0344aaa3810e2d18229f315480fc72a89.tar.xz linux-56d144d0344aaa3810e2d18229f315480fc72a89.zip |
clk: hsdk-pll: 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-5-lars@metafoo.de
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to '')
-rw-r--r-- | drivers/clk/clk-hsdk-pll.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/clk/clk-hsdk-pll.c b/drivers/clk/clk-hsdk-pll.c index 766e139972fe..33b48ea5ea3d 100644 --- a/drivers/clk/clk-hsdk-pll.c +++ b/drivers/clk/clk-hsdk-pll.c @@ -346,13 +346,8 @@ static int hsdk_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 hsdk_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_hsdk_pll_clk_setup(struct device_node *node) @@ -431,6 +426,5 @@ static struct platform_driver hsdk_pll_clk_driver = { .of_match_table = hsdk_pll_clk_id, }, .probe = hsdk_pll_clk_probe, - .remove_new = hsdk_pll_clk_remove, }; builtin_platform_driver(hsdk_pll_clk_driver); |