Skip to content

Commit

Permalink
usb: gadget: pxa25x: fix disconnect reporting
Browse files Browse the repository at this point in the history
when commit 6166c24 (usb: gadget: pxa25x_udc:
convert to udc_start/udc_stop) converted
this driver to udc_start/udc_stop, it failed
to consider the fact that stop_activity()
is called from disconnect interrupt.

Fix the problem so that gadget drivers know
about proper disconnect sequences.

Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Felipe Balbi committed Mar 11, 2013
1 parent c390b03 commit 66e4afc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/usb/gadget/pxa25x_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1303,6 +1303,10 @@ stop_activity(struct pxa25x_udc *dev, struct usb_gadget_driver *driver)
}
del_timer_sync(&dev->timer);

/* report disconnect; the driver is already quiesced */
if (driver)
driver->disconnect(&dev->gadget);

/* re-init driver-visible data structures */
udc_reinit(dev);
}
Expand Down

0 comments on commit 66e4afc

Please sign in to comment.