summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@freescale.com>2015-06-23 16:04:57 +0800
committerPeter Chen <peter.chen@freescale.com>2015-06-24 16:47:16 +0800
commit672b1cae3c5c0b3b28aa0ec7b1070274c4b5f0f1 (patch)
tree0c13cd2c050ee76b2a7bb7da50f90f4f03c441c9
parent6fe7643c513eabf2a9c844e633566490c376cc7a (diff)
MLK-11151 usb: chipidea: otg: drive vbus off if fsm.drv_vbus is true
The current condition may not true even we have driven vbus on already. The vbus drive operation may be async, eg through i2c gpio expendor, so the vbus may not be valid when we unload usb module. We meet this issue when we do fast load/unload usb module test. Signed-off-by: Peter Chen <peter.chen@freescale.com> (cherry picked from commit a4dec7730c98f2639fe250a1a67f782b6f73bdf5)
-rw-r--r--drivers/usb/chipidea/otg_fsm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/chipidea/otg_fsm.c b/drivers/usb/chipidea/otg_fsm.c
index 6e1070b19fed..d85844370064 100644
--- a/drivers/usb/chipidea/otg_fsm.c
+++ b/drivers/usb/chipidea/otg_fsm.c
@@ -1175,7 +1175,7 @@ void ci_hdrc_otg_fsm_remove(struct ci_hdrc *ci)
ci->enabled_otg_timer_bits = 0;
/* Turn off vbus if vbus is on */
- if (ci->fsm.a_vbus_vld)
+ if (ci->fsm.drv_vbus)
otg_drv_vbus(&ci->fsm, 0);
sysfs_remove_group(&ci->dev->kobj, &inputs_attr_group);