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>
This commit is contained in:
Lars-Peter Clausen 2023-04-09 18:44:53 -07:00 committed by Stephen Boyd
parent a301528f79
commit f042ebcfcc

@ -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,