usb: otg: tegra: no state change until otg resumes
Krishna Yarlagadda [Thu, 9 May 2013 11:17:48 +0000 (16:17 +0530)]
USB state change might involve removing ehci device which
should not be handled before drivers are resumed.
No state change while otg driver is still in suspend

Change-Id: Ib92c75ee3397a79b6e7770935f2004a9ad94fec1
Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-on: http://git-master/r/227032
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Tested-by: Hayden Du <haydend@nvidia.com>

drivers/usb/otg/tegra-otg.c

index 6c89caf..23fb48f 100644 (file)
@@ -113,7 +113,8 @@ static int otg_notifications(struct notifier_block *nb,
        DBG("%s(%d) tegra->int_status = 0x%lx\n", __func__,
                                __LINE__, tegra->int_status);
 
-       schedule_work(&tegra->work);
+       if (!tegra->suspended)
+               schedule_work(&tegra->work);
 
        DBG("%s(%d) End\n", __func__, __LINE__);
        return NOTIFY_DONE;