tenderloin usb: fix release of wakelock
The msm_otg wakelock can get 'stuck' in some cases. In particular,
when Touchpad is placed on Touchstone charger when the Touchpad
is in deep-sleep. This should allow for proper release of the
msm_otg wakelock in that and similar cases.
diff --git a/drivers/usb/otg/msm72k_otg.c b/drivers/usb/otg/msm72k_otg.c
index f3574d0..4b1596c 100644
--- a/drivers/usb/otg/msm72k_otg.c
+++ b/drivers/usb/otg/msm72k_otg.c
@@ -951,6 +951,11 @@
 		msm_otg_start_host(dev->phy.otg, REQUEST_RESUME);
 	}
 
+	if (!work_pending(&dev->sm_work) && !hrtimer_active(&dev->timer) &&
+			!work_pending(&dev->otg_resume_work)) {
+		wake_lock_timeout(&dev->wlock, msecs_to_jiffies(2000));
+	}
+
 	/* Enable irq which was disabled before scheduling this work.
 	 * But don't release wake_lock, as we got async interrupt and
 	 * there will be some work pending for OTG state machine.