summaryrefslogtreecommitdiff
path: root/drivers/usb/chipidea/otg.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-08 16:27:14 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-08 16:27:14 +0200
commit6503016ea5d3945f9af1eeac23ba99f408f3af1e (patch)
tree7b965b962ccaf761eacf9adae671797085814344 /drivers/usb/chipidea/otg.c
parent8aff4eaa1de7a0ba70af8447ed08127ef0e8e45d (diff)
parent59739131e0ca06db7560f9073fff2fb83f6bc2a5 (diff)
Merge tag 'usb-ci-v4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-testing
Peter writes: - Add pinctrl support for dual-role switch at chipidea-core - improve overcorrent handling for imx - some small code restructure (no function affect) * tag 'usb-ci-v4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb: usb: chipidea: Fix otg event handler usb: chipidea: Prevent unbalanced IRQ disable doc: usb: ci-hdrc-usb2: Add pinctrl properties definition usb: chipidea: Add dynamic pinctrl selection usb: chipidea: imx: make MODULE_LICENCE and SPDX-identifier match usb: chipidea: imx: enable OTG overcurrent in case USB subsystem is already started usb: chipidea: imx: do not use preprocessor conditionals for PM
Diffstat (limited to 'drivers/usb/chipidea/otg.c')
-rw-r--r--drivers/usb/chipidea/otg.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/usb/chipidea/otg.c b/drivers/usb/chipidea/otg.c
index db4ceffcf2a6..f25d4827fd49 100644
--- a/drivers/usb/chipidea/otg.c
+++ b/drivers/usb/chipidea/otg.c
@@ -203,14 +203,17 @@ static void ci_otg_work(struct work_struct *work)
}
pm_runtime_get_sync(ci->dev);
+
if (ci->id_event) {
ci->id_event = false;
ci_handle_id_switch(ci);
- } else if (ci->b_sess_valid_event) {
+ }
+
+ if (ci->b_sess_valid_event) {
ci->b_sess_valid_event = false;
ci_handle_vbus_change(ci);
- } else
- dev_err(ci->dev, "unexpected event occurs at %s\n", __func__);
+ }
+
pm_runtime_put_sync(ci->dev);
enable_irq(ci->irq);