Skip to content

Commit

Permalink
usb: dwc3: gadget: cut and paste fixups in suspend/resume
Browse files Browse the repository at this point in the history
These were cut and paste from the ->disconnect function.

Fixes commit 30d577b9bcc4 ('usb: dwc3: gadget: call gadget driver's
->suspend/->resume')

Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
  • Loading branch information
Dan Carpenter authored and Felipe Balbi committed Mar 7, 2014
1 parent d95faae commit 73a30bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/dwc3/gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -2047,7 +2047,7 @@ static void dwc3_disconnect_gadget(struct dwc3 *dwc)

static void dwc3_suspend_gadget(struct dwc3 *dwc)
{
if (dwc->gadget_driver && dwc->gadget_driver->disconnect) {
if (dwc->gadget_driver && dwc->gadget_driver->suspend) {
spin_unlock(&dwc->lock);
dwc->gadget_driver->suspend(&dwc->gadget);
spin_lock(&dwc->lock);
Expand All @@ -2056,7 +2056,7 @@ static void dwc3_suspend_gadget(struct dwc3 *dwc)

static void dwc3_resume_gadget(struct dwc3 *dwc)
{
if (dwc->gadget_driver && dwc->gadget_driver->disconnect) {
if (dwc->gadget_driver && dwc->gadget_driver->resume) {
spin_unlock(&dwc->lock);
dwc->gadget_driver->resume(&dwc->gadget);
spin_lock(&dwc->lock);
Expand Down

0 comments on commit 73a30bf

Please sign in to comment.