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

clk: axs10x: 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-3-lars@metafoo.deSigned-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent f042ebcf
...@@ -253,15 +253,10 @@ static int axs10x_pll_clk_probe(struct platform_device *pdev) ...@@ -253,15 +253,10 @@ static int axs10x_pll_clk_probe(struct platform_device *pdev)
return ret; return ret;
} }
return of_clk_add_hw_provider(dev->of_node, of_clk_hw_simple_get, return devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get,
&pll_clk->hw); &pll_clk->hw);
} }
static void axs10x_pll_clk_remove(struct platform_device *pdev)
{
of_clk_del_provider(pdev->dev.of_node);
}
static void __init of_axs10x_pll_clk_setup(struct device_node *node) static void __init of_axs10x_pll_clk_setup(struct device_node *node)
{ {
const char *parent_name; const char *parent_name;
...@@ -331,7 +326,6 @@ static struct platform_driver axs10x_pll_clk_driver = { ...@@ -331,7 +326,6 @@ static struct platform_driver axs10x_pll_clk_driver = {
.of_match_table = axs10x_pll_clk_id, .of_match_table = axs10x_pll_clk_id,
}, },
.probe = axs10x_pll_clk_probe, .probe = axs10x_pll_clk_probe,
.remove_new = axs10x_pll_clk_remove,
}; };
builtin_platform_driver(axs10x_pll_clk_driver); builtin_platform_driver(axs10x_pll_clk_driver);
......
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