Skip to content

Commit f042ebc

Browse files
larsclausenbebarino
authored andcommitted
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>
1 parent a301528 commit f042ebc

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

drivers/clk/clk-axm5516.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -569,17 +569,11 @@ static int axmclk_probe(struct platform_device *pdev)
569569
return ret;
570570
}
571571

572-
return of_clk_add_hw_provider(dev->of_node, of_clk_axmclk_get, NULL);
573-
}
574-
575-
static void axmclk_remove(struct platform_device *pdev)
576-
{
577-
of_clk_del_provider(pdev->dev.of_node);
572+
return devm_of_clk_add_hw_provider(dev, of_clk_axmclk_get, NULL);
578573
}
579574

580575
static struct platform_driver axmclk_driver = {
581576
.probe = axmclk_probe,
582-
.remove_new = axmclk_remove,
583577
.driver = {
584578
.name = "clk-axm5516",
585579
.of_match_table = axmclk_match_table,

0 commit comments

Comments
 (0)