Subject: linux-2.6.37-ektf-fix-circular-locking.patch

Fix 10615 [1.2Testing][REG] touchscreen lockdep warning: "possible circular locking dependency detected"

[   17.959378] =======================================================
[   17.960058] [ INFO: possible circular locking dependency detected ]
[   17.960058] 2.6.37.6-24.3-adaptation-mrst #1
[   17.960058] -------------------------------------------------------
[   17.960058] sr-engine-touch/677 is trying to acquire lock:
[   17.994500]  (&ed->mutex){+.+.+.}, at: [<c1405cf7>] ektf2136_runtime_resume+0x47/0xb0
[   17.994500] 
[   17.994500] but task is already holding lock:
[   17.994500]  (&dev->mutex){+.+...}, at: [<c13f3624>] input_open_device+0x24/0xb0
[   17.994500] 
[   17.994500] which lock already depends on the new lock.

Signed-off-by: Mike Hsu <mike_t_hsu@wistron.com>
Signed-off-by: Scott Liu <scott.liu@emc.com.tw>

---
 ektf2136_spi.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- linux-2.6.37/drivers/input/touchscreen/ektf2136_spi.old.c	2011-07-11 15:48:26.000000000 +0800
+++ linux-2.6.37/drivers/input/touchscreen/ektf2136_spi.c	2011-07-11 15:57:37.000000000 +0800
@@ -30,11 +30,11 @@
 #include <linux/pm_runtime.h>
 
 #define DRV_NAME	"ektf2136_spi"
-#define DRIVER_VERSION	"v3.0.6"
+#define DRIVER_VERSION	"v3.0.7"
 
 #define DRV_MA_VER 3
 #define DRV_MI_VER 0
-#define DRV_SUB_MI_VER 6
+#define DRV_SUB_MI_VER 7
 
 static const char ELAN_TS_NAME[]	= "ektf2136_spi";
 
@@ -2642,11 +2642,11 @@
 	PREPARE_WORK(&ed->work, elan_touch_work_func);
 	elan_touch_register_interrupt(spi);
 
+	mutex_unlock(&ed->mutex);
+
 	pm_runtime_set_active(&ed->spi->dev);
 	pm_runtime_enable(&ed->spi->dev);
 
-	mutex_unlock(&ed->mutex);
-
 	ed->status |= STA_INIT3;
 
 	return ;
