Skip to contentSkip to conversation

clk: remove clock notifier at unregister

PATCH New David Andrey 2 participants 2 messages Apr 22, 2013 – May 6, 2013 Common clk

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: remove clock notifier at unregister

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

---
 drivers/clk/clk.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/clk/clk.c +3 -0
index 20ce67f..eb66434 100644
@@ -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);
 		}
 
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH 1/1 clk: remove clock notifier at unregister

Quoting David Andrey (2013-04-22 05:22:41)

Quoted 5 lines

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

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

Thanks,
Mike

Quoted 21 lines
---
 drivers/clk/clk.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/clk/clk.c +3 -0
index 20ce67f..eb66434 100644
@@ -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);
                }
 
Signature · 1 line
1.7.4.1