linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: fixed-rate: fix of_node_get-put imbalance
@ 2018-10-18 19:54 Alan Tull
  2018-10-18 20:22 ` Stephen Boyd
  0 siblings, 1 reply; 3+ messages in thread
From: Alan Tull @ 2018-10-18 19:54 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd
  Cc: Ricardo Ribalda Delgado, Alan Tull, linux-clk, linux-kernel

When the fixed rate clock is created by devicetree,
of_clk_add_provider is called.  Add a call to
of_clk_del_provider in the remove function to balance
it out.

Signed-off-by: Alan Tull <atull@kernel.org>
---
 drivers/clk/clk-fixed-rate.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/clk-fixed-rate.c b/drivers/clk/clk-fixed-rate.c
index b5c46b3f8764..6d6475c32ee5 100644
--- a/drivers/clk/clk-fixed-rate.c
+++ b/drivers/clk/clk-fixed-rate.c
@@ -200,6 +200,7 @@ static int of_fixed_clk_remove(struct platform_device *pdev)
 {
 	struct clk *clk = platform_get_drvdata(pdev);
 
+	of_clk_del_provider(pdev->dev.of_node);
 	clk_unregister_fixed_rate(clk);
 
 	return 0;
-- 
2.16.2


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

* Re: [PATCH] clk: fixed-rate: fix of_node_get-put imbalance
  2018-10-18 19:54 [PATCH] clk: fixed-rate: fix of_node_get-put imbalance Alan Tull
@ 2018-10-18 20:22 ` Stephen Boyd
  2018-10-18 20:30   ` Alan Tull
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Boyd @ 2018-10-18 20:22 UTC (permalink / raw)
  To: Alan Tull, Michael Turquette
  Cc: Ricardo Ribalda Delgado, Alan Tull, linux-clk, linux-kernel

Quoting Alan Tull (2018-10-18 12:54:11)
> When the fixed rate clock is created by devicetree,
> of_clk_add_provider is called.  Add a call to
> of_clk_del_provider in the remove function to balance
> it out.
> 
> Signed-off-by: Alan Tull <atull@kernel.org>
> ---

Fixes tag? I'll tack one on.

>  drivers/clk/clk-fixed-rate.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/clk/clk-fixed-rate.c b/drivers/clk/clk-fixed-rate.c
> index b5c46b3f8764..6d6475c32ee5 100644
> --- a/drivers/clk/clk-fixed-rate.c
> +++ b/drivers/clk/clk-fixed-rate.c
> @@ -200,6 +200,7 @@ static int of_fixed_clk_remove(struct platform_device *pdev)
>  {
>         struct clk *clk = platform_get_drvdata(pdev);
>  
> +       of_clk_del_provider(pdev->dev.of_node);
>         clk_unregister_fixed_rate(clk);
>  
>         return 0;

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

* Re: [PATCH] clk: fixed-rate: fix of_node_get-put imbalance
  2018-10-18 20:22 ` Stephen Boyd
@ 2018-10-18 20:30   ` Alan Tull
  0 siblings, 0 replies; 3+ messages in thread
From: Alan Tull @ 2018-10-18 20:30 UTC (permalink / raw)
  To: sboyd; +Cc: mturquette, Ricardo Ribalda Delgado, linux-clk, linux-kernel

On Thu, Oct 18, 2018 at 3:22 PM Stephen Boyd <sboyd@kernel.org> wrote:
>
> Quoting Alan Tull (2018-10-18 12:54:11)
> > When the fixed rate clock is created by devicetree,
> > of_clk_add_provider is called.  Add a call to
> > of_clk_del_provider in the remove function to balance
> > it out.
> >
> > Signed-off-by: Alan Tull <atull@kernel.org>
> > ---
>
> Fixes tag? I'll tack one on.

Fixes 435779fe1336 ("clk: fixed-rate: Convert into a module platform driver")

Thanks!
Alan

>
> >  drivers/clk/clk-fixed-rate.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/clk/clk-fixed-rate.c b/drivers/clk/clk-fixed-rate.c
> > index b5c46b3f8764..6d6475c32ee5 100644
> > --- a/drivers/clk/clk-fixed-rate.c
> > +++ b/drivers/clk/clk-fixed-rate.c
> > @@ -200,6 +200,7 @@ static int of_fixed_clk_remove(struct platform_device *pdev)
> >  {
> >         struct clk *clk = platform_get_drvdata(pdev);
> >
> > +       of_clk_del_provider(pdev->dev.of_node);
> >         clk_unregister_fixed_rate(clk);
> >
> >         return 0;

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

end of thread, other threads:[~2018-10-18 20:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-18 19:54 [PATCH] clk: fixed-rate: fix of_node_get-put imbalance Alan Tull
2018-10-18 20:22 ` Stephen Boyd
2018-10-18 20:30   ` Alan Tull

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).