summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@freescale.com>2015-07-02 09:41:04 +0800
committerLi Jun <jun.li@freescale.com>2015-07-22 10:22:18 +0800
commit57bb978267c22e7953dd2278aeb6d99e79d88ce9 (patch)
tree469263ae5b1503db21e7bd7716d5e594f38194c2 /drivers
parent7a1df50d88c7d12f776b5f8e11e72317af01ed22 (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)
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/chipidea/otg.c6
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);
}