From a4dec7730c98f2639fe250a1a67f782b6f73bdf5 Mon Sep 17 00:00:00 2001 From: Peter Chen Date: Tue, 23 Jun 2015 16:04:57 +0800 Subject: 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 --- drivers/usb/chipidea/otg_fsm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/chipidea/otg_fsm.c b/drivers/usb/chipidea/otg_fsm.c index 13fc169ef76d..ceed9bbd898f 100644 --- a/drivers/usb/chipidea/otg_fsm.c +++ b/drivers/usb/chipidea/otg_fsm.c @@ -943,7 +943,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); -- cgit v1.2.3