diff mbox

[03/03] OMAP3 clock: Fix locking in notifier register

Message ID 5A47E75E594F054BAF48C5E4FC4B92AB02FAF6EF3A@dbde02.ent.ti.com (mailing list archive)
State Superseded
Delegated to: Kevin Hilman
Headers show

Commit Message

Rajendra Nayak March 20, 2009, 1:50 p.m. UTC
From: Rajendra Nayak <rnayak@ti.com>

This patch avoids spinlocks being held when calling
blocking_notifier_chain_register().

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Tero Kristo <tero.kristo@nokia.com>
---
 arch/arm/plat-omap/clock.c |    4 ++++
 1 files changed, 4 insertions(+)

To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

Index: linux-omap-pm/arch/arm/plat-omap/clock.c
===================================================================
--- linux-omap-pm.orig/arch/arm/plat-omap/clock.c	2009-03-20 17:11:54.000000000 +0530
+++ linux-omap-pm/arch/arm/plat-omap/clock.c	2009-03-20 19:14:35.387298482 +0530
@@ -673,7 +673,11 @@  int clk_notifier_register(struct clk *cl
 		kfree(cn_new); /* didn't need it after all */
 	}
 
+	spin_unlock_irqrestore(&clockfw_lock, flags);
+
 	r = blocking_notifier_chain_register(&cn->notifier_head, nb);
+
+	spin_lock_irqsave(&clockfw_lock, flags);
 	if (!r) {
 		clkp = clk;
 		do {--