aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2014-02-10 05:34:21 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2014-02-10 05:34:18 -0800
commit97458c60fded3911fa19195eef2b43d8d5439e5c (patch)
treee8d9e54721e47074c820918d7d8b3fc7811ba81d
parent0966dfb478c89d333b27aa776b3bb70b5405d41b (diff)
parent81ca96c86fe7e4336a3de99eef27b8c66d6c1669 (diff)
Merge "phy_msm_usb: Fix crash when switching from peripheral to host mode"
-rw-r--r--drivers/usb/phy/phy-msm-usb.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
index c6a12a34f58..13449237e71 100644
--- a/drivers/usb/phy/phy-msm-usb.c
+++ b/drivers/usb/phy/phy-msm-usb.c
@@ -3447,6 +3447,7 @@ static irqreturn_t msm_otg_irq(int irq, void *data)
static void msm_otg_set_vbus_state(int online)
{
struct msm_otg *motg = the_msm_otg;
+ static bool init;
if (online) {
pr_debug("PMIC: BSV set\n");
@@ -3463,11 +3464,12 @@ static void msm_otg_set_vbus_state(int online)
* completion in UNDEFINED state. Process
* the initial VBUS event in ID_GND state.
*/
- if (pmic_vbus_init.done)
+ if (init)
return;
}
- if (!pmic_vbus_init.done) {
+ if (!init) {
+ init = true;
complete(&pmic_vbus_init);
pr_debug("PMIC: BSV init complete\n");
return;