linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: remove clock notifier at unregister
@ 2013-04-22 12:22 David Andrey
  2013-05-06 22:41 ` Mike Turquette
  0 siblings, 1 reply; 2+ messages in thread
From: David Andrey @ 2013-04-22 12:22 UTC (permalink / raw)
  To: linux-arm-kernel

Clock notifier node is now removed from the
notifier list during unregister

Signed-off-by: David Andrey <david.andrey@netmodule.com>
Acked-by: Martin Meuli <martin.meuli@netmodule.com>
---
 drivers/clk/clk.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 20ce67f..eb66434 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -1941,7 +1941,10 @@ int clk_notifier_unregister(struct clk *clk, struct notifier_block *nb)
 
 		/* XXX the notifier code should handle this better */
 		if (!cn->notifier_head.head) {
+			if (clk->notifier_count)
+				BUG();
 			srcu_cleanup_notifier_head(&cn->notifier_head);
+			list_del(&cn->node);
 			kfree(cn);
 		}
 
-- 
1.7.4.1

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

* [PATCH] clk: remove clock notifier at unregister
  2013-04-22 12:22 [PATCH] clk: remove clock notifier at unregister David Andrey
@ 2013-05-06 22:41 ` Mike Turquette
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Turquette @ 2013-05-06 22:41 UTC (permalink / raw)
  To: linux-arm-kernel

Quoting David Andrey (2013-04-22 05:22:41)
> Clock notifier node is now removed from the
> notifier list during unregister
> 
> Signed-off-by: David Andrey <david.andrey@netmodule.com>
> Acked-by: Martin Meuli <martin.meuli@netmodule.com>

This looks good.  I'll take it in after -rc1 comes out.

Thanks,
Mike

> ---
>  drivers/clk/clk.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> index 20ce67f..eb66434 100644
> --- a/drivers/clk/clk.c
> +++ b/drivers/clk/clk.c
> @@ -1941,7 +1941,10 @@ int clk_notifier_unregister(struct clk *clk, struct notifier_block *nb)
>  
>                 /* XXX the notifier code should handle this better */
>                 if (!cn->notifier_head.head) {
> +                       if (clk->notifier_count)
> +                               BUG();
>                         srcu_cleanup_notifier_head(&cn->notifier_head);
> +                       list_del(&cn->node);
>                         kfree(cn);
>                 }
>  
> -- 
> 1.7.4.1

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

end of thread, other threads:[~2013-05-06 22:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-22 12:22 [PATCH] clk: remove clock notifier at unregister David Andrey
2013-05-06 22:41 ` Mike Turquette

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