usb: musb: must power on in workaround_work
authorGrazvydas Ignotas <notasas@gmail.com>
Fri, 22 Mar 2013 16:29:14 +0000 (18:29 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Fri, 22 Mar 2013 16:31:54 +0000 (18:31 +0200)
otherwise we get a fault if not powered on when work triggers..

drivers/usb/musb/musb_core.c

index 53d668e..dd2d742 100644 (file)
@@ -1815,6 +1815,8 @@ static void musb_vbus_workaround_work(struct work_struct *work)
        if (musb_ulpi_access.write == NULL)
                return;
 
+       pm_runtime_get_sync(musb->controller);
+
        devctl = musb_readb(musb->mregs, MUSB_DEVCTL);
 
        /*
@@ -1837,6 +1839,8 @@ static void musb_vbus_workaround_work(struct work_struct *work)
                //if (ret)
                //      dev_err(musb->controller, "VBUS workaround error\n");
        }
+
+       pm_runtime_put(musb->controller);
 }
 
 /* --------------------------------------------------------------------------