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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Rajendra Nayak <rnayak@xxxxxx>

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

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

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 {--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux