linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/11] clk: axi-clkgen: Use managed `of_clk_add_hw_provider()`
@ 2023-04-10  1:44 Lars-Peter Clausen
  2023-04-10  1:44 ` [PATCH 02/11] clk: axm5516: " Lars-Peter Clausen
                   ` (11 more replies)
  0 siblings, 12 replies; 23+ messages in thread
From: Lars-Peter Clausen @ 2023-04-10  1:44 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd
  Cc: Eugeniy Paltsev, Mike Looijmans, Max Filippov, Bjorn Andersson,
	Kunihiko Hayashi, Masami Hiramatsu, Sebastian Hesselbarth,
	linux-clk, Lars-Peter Clausen

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>
---
Sorry if you received this multiple times. Forgot to cc the mailinglist.
---
 drivers/clk/clk-axi-clkgen.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/clk/clk-axi-clkgen.c b/drivers/clk/clk-axi-clkgen.c
index 671bee55ceb3..a04a3d38c76e 100644
--- a/drivers/clk/clk-axi-clkgen.c
+++ b/drivers/clk/clk-axi-clkgen.c
@@ -553,13 +553,8 @@ static int axi_clkgen_probe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
-	return of_clk_add_hw_provider(pdev->dev.of_node, of_clk_hw_simple_get,
-				      &axi_clkgen->clk_hw);
-}
-
-static void axi_clkgen_remove(struct platform_device *pdev)
-{
-	of_clk_del_provider(pdev->dev.of_node);
+	return devm_of_clk_add_hw_provider(&pdev->dev, of_clk_hw_simple_get,
+					   &axi_clkgen->clk_hw);
 }
 
 static const struct of_device_id axi_clkgen_ids[] = {
@@ -581,7 +576,6 @@ static struct platform_driver axi_clkgen_driver = {
 		.of_match_table = axi_clkgen_ids,
 	},
 	.probe = axi_clkgen_probe,
-	.remove_new = axi_clkgen_remove,
 };
 module_platform_driver(axi_clkgen_driver);
 
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2023-04-14  3:34 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-10  1:44 [PATCH 01/11] clk: axi-clkgen: Use managed `of_clk_add_hw_provider()` Lars-Peter Clausen
2023-04-10  1:44 ` [PATCH 02/11] clk: axm5516: " Lars-Peter Clausen
2023-04-10 19:58   ` Stephen Boyd
2023-04-10  1:44 ` [PATCH 03/11] clk: axs10x: " Lars-Peter Clausen
2023-04-10 19:58   ` Stephen Boyd
2023-04-10  1:44 ` [PATCH 04/11] clk: cdce706: " Lars-Peter Clausen
2023-04-10 19:58   ` Stephen Boyd
2023-04-10  1:44 ` [PATCH 05/11] clk: hsdk-pll: " Lars-Peter Clausen
2023-04-10 19:58   ` Stephen Boyd
2023-04-10  1:44 ` [PATCH 06/11] clk: lmk04832: " Lars-Peter Clausen
2023-04-10 19:59   ` Stephen Boyd
2023-04-10  1:44 ` [PATCH 07/11] clk: qcom: rpm: " Lars-Peter Clausen
2023-04-10 19:59   ` Stephen Boyd
2023-04-10  1:44 ` [PATCH 08/11] clk: si514: " Lars-Peter Clausen
2023-04-10 19:59   ` Stephen Boyd
2023-04-10  1:45 ` [PATCH 09/11] clk: si570: " Lars-Peter Clausen
2023-04-10 19:59   ` Stephen Boyd
2023-04-10  1:45 ` [PATCH 10/11] clk: si5351: " Lars-Peter Clausen
2023-04-10 20:00   ` Stephen Boyd
2023-04-10  1:45 ` [PATCH 11/11] clk: uniphier: " Lars-Peter Clausen
2023-04-10 20:00   ` Stephen Boyd
2023-04-10 19:58 ` [PATCH 01/11] clk: axi-clkgen: " Stephen Boyd
2023-04-14  3:37 ` (subset) " Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).