summaryrefslogtreecommitdiff
path: root/drivers/clk
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2023-04-10 04:44:53 +0300
committerStephen Boyd <sboyd@kernel.org>2023-04-10 22:45:12 +0300
commitf042ebcfccaa9761b4f36ffa33b0663d6f6eaaa4 (patch)
tree900b46d1cfbadbb073775a591c2f900a2df3f164 /drivers/clk
parenta301528f79d1ec27cd34122d655e0200a950f960 (diff)
downloadlinux-f042ebcfccaa9761b4f36ffa33b0663d6f6eaaa4.tar.xz
clk: axm5516: 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-2-lars@metafoo.de Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/clk-axm5516.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/clk/clk-axm5516.c b/drivers/clk/clk-axm5516.c
index 1dff2017ad9d..1afcfdf2e6f9 100644
--- a/drivers/clk/clk-axm5516.c
+++ b/drivers/clk/clk-axm5516.c
@@ -569,17 +569,11 @@ static int axmclk_probe(struct platform_device *pdev)
return ret;
}
- return of_clk_add_hw_provider(dev->of_node, of_clk_axmclk_get, NULL);
-}
-
-static void axmclk_remove(struct platform_device *pdev)
-{
- of_clk_del_provider(pdev->dev.of_node);
+ return devm_of_clk_add_hw_provider(dev, of_clk_axmclk_get, NULL);
}
static struct platform_driver axmclk_driver = {
.probe = axmclk_probe,
- .remove_new = axmclk_remove,
.driver = {
.name = "clk-axm5516",
.of_match_table = axmclk_match_table,