diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/usb/chipidea/otg_fsm.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/usb/chipidea/otg_fsm.c b/drivers/usb/chipidea/otg_fsm.c index 083acf45ad5a..19d655a743b5 100644 --- a/drivers/usb/chipidea/otg_fsm.c +++ b/drivers/usb/chipidea/otg_fsm.c | |||
| @@ -520,7 +520,6 @@ static int ci_otg_start_host(struct otg_fsm *fsm, int on) | |||
| 520 | { | 520 | { |
| 521 | struct ci_hdrc *ci = container_of(fsm, struct ci_hdrc, fsm); | 521 | struct ci_hdrc *ci = container_of(fsm, struct ci_hdrc, fsm); |
| 522 | 522 | ||
| 523 | mutex_unlock(&fsm->lock); | ||
| 524 | if (on) { | 523 | if (on) { |
| 525 | ci_role_stop(ci); | 524 | ci_role_stop(ci); |
| 526 | ci_role_start(ci, CI_ROLE_HOST); | 525 | ci_role_start(ci, CI_ROLE_HOST); |
| @@ -529,7 +528,6 @@ static int ci_otg_start_host(struct otg_fsm *fsm, int on) | |||
| 529 | hw_device_reset(ci); | 528 | hw_device_reset(ci); |
| 530 | ci_role_start(ci, CI_ROLE_GADGET); | 529 | ci_role_start(ci, CI_ROLE_GADGET); |
| 531 | } | 530 | } |
| 532 | mutex_lock(&fsm->lock); | ||
| 533 | return 0; | 531 | return 0; |
| 534 | } | 532 | } |
| 535 | 533 | ||
| @@ -537,12 +535,10 @@ static int ci_otg_start_gadget(struct otg_fsm *fsm, int on) | |||
| 537 | { | 535 | { |
| 538 | struct ci_hdrc *ci = container_of(fsm, struct ci_hdrc, fsm); | 536 | struct ci_hdrc *ci = container_of(fsm, struct ci_hdrc, fsm); |
| 539 | 537 | ||
| 540 | mutex_unlock(&fsm->lock); | ||
| 541 | if (on) | 538 | if (on) |
| 542 | usb_gadget_vbus_connect(&ci->gadget); | 539 | usb_gadget_vbus_connect(&ci->gadget); |
| 543 | else | 540 | else |
| 544 | usb_gadget_vbus_disconnect(&ci->gadget); | 541 | usb_gadget_vbus_disconnect(&ci->gadget); |
| 545 | mutex_lock(&fsm->lock); | ||
| 546 | 542 | ||
| 547 | return 0; | 543 | return 0; |
| 548 | } | 544 | } |
