diff options
author | Peter Chen <peter.chen@freescale.com> | 2015-07-02 09:41:04 +0800 |
---|---|---|
committer | Li Jun <jun.li@freescale.com> | 2015-07-16 08:26:18 +0800 |
commit | 15cbb089473a6273fce846417e8275e94769e683 (patch) | |
tree | 8eaa7e68c26b0749ac5ebb8046a3b1020c6b9905 | |
parent | 62e467e6d27aeb1d13ce3cd025deb44300308a60 (diff) |
MLK-11183-2 usb: chipidea: otg: disable otg interrupt before flush_workqueue
We do not want (care) the interrupt during we remove the otg function,
so move it beforehand.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit 9ae22c687fd161dfff2e81512b50143fa154b9bb)
-rw-r--r-- | drivers/usb/chipidea/otg.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/chipidea/otg.c b/drivers/usb/chipidea/otg.c index 9f9cd6a75d70..9bb4278b8f17 100644 --- a/drivers/usb/chipidea/otg.c +++ b/drivers/usb/chipidea/otg.c @@ -217,14 +217,14 @@ int ci_hdrc_otg_init(struct ci_hdrc *ci) */ void ci_hdrc_otg_destroy(struct ci_hdrc *ci) { + /* Disable all OTG irq and clear status */ + hw_write_otgsc(ci, OTGSC_INT_EN_BITS | OTGSC_INT_STATUS_BITS, + OTGSC_INT_STATUS_BITS); if (ci->wq) { flush_workqueue(ci->wq); destroy_workqueue(ci->wq); ci->wq = NULL; } - /* Disable all OTG irq and clear status */ - hw_write_otgsc(ci, OTGSC_INT_EN_BITS | OTGSC_INT_STATUS_BITS, - OTGSC_INT_STATUS_BITS); if (ci_otg_is_fsm_mode(ci)) ci_hdrc_otg_fsm_remove(ci); } |