From 78d2efdfe58aac881884a309432c60600711ca0e Mon Sep 17 00:00:00 2001 From: Peter Chen Date: Thu, 2 Jul 2015 09:41:04 +0800 Subject: [PATCH] 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 (cherry picked from commit 9ae22c687fd161dfff2e81512b50143fa154b9bb) --- drivers/usb/chipidea/otg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/chipidea/otg.c b/drivers/usb/chipidea/otg.c index 1d2d99c8135a..7c1a6b66fcba 100644 --- a/drivers/usb/chipidea/otg.c +++ b/drivers/usb/chipidea/otg.c @@ -327,14 +327,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); } -- 2.17.1