Commit c0e19528 authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Stephen Boyd

clk: uniphier: 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: default avatarLars-Peter Clausen <lars@metafoo.de>
Link: https://lore.kernel.org/r/20230410014502.27929-11-lars@metafoo.deSigned-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 361dde3c
...@@ -87,15 +87,10 @@ static int uniphier_clk_probe(struct platform_device *pdev) ...@@ -87,15 +87,10 @@ static int uniphier_clk_probe(struct platform_device *pdev)
hw_data->hws[p->idx] = hw; hw_data->hws[p->idx] = hw;
} }
return of_clk_add_hw_provider(dev->of_node, of_clk_hw_onecell_get, return devm_of_clk_add_hw_provider(dev, of_clk_hw_onecell_get,
hw_data); hw_data);
} }
static void uniphier_clk_remove(struct platform_device *pdev)
{
of_clk_del_provider(pdev->dev.of_node);
}
static const struct of_device_id uniphier_clk_match[] = { static const struct of_device_id uniphier_clk_match[] = {
/* System clock */ /* System clock */
{ {
...@@ -218,7 +213,6 @@ static const struct of_device_id uniphier_clk_match[] = { ...@@ -218,7 +213,6 @@ static const struct of_device_id uniphier_clk_match[] = {
static struct platform_driver uniphier_clk_driver = { static struct platform_driver uniphier_clk_driver = {
.probe = uniphier_clk_probe, .probe = uniphier_clk_probe,
.remove_new = uniphier_clk_remove,
.driver = { .driver = {
.name = "uniphier-clk", .name = "uniphier-clk",
.of_match_table = uniphier_clk_match, .of_match_table = uniphier_clk_match,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment