summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@freescale.com>2015-06-23 16:04:57 +0800
committerNitin Garg <nitin.garg@freescale.com>2015-09-17 09:23:44 -0500
commitbec89bce7f618d4515e7261af3f62a14d09b445a (patch)
treeaf909463695b0f42c9ec65696e628d1c42dc457a /drivers/usb
parent200c8698a60f07b5da5b12994a70662c6358df83 (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) (cherry picked from commit 672b1cae3c5c0b3b28aa0ec7b1070274c4b5f0f1)
Diffstat (limited to 'drivers/usb')
-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);