usb: gadget: composite: Clear "suspended" on reset/disconnect
In some cases, one can get out of suspend with a reset or a disconnect followed by a reconnect. Previously we would leave a stale suspended flag set. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
This commit is contained in:
parent
5dac665cf4
commit
602fda17c7
|
@ -1976,6 +1976,7 @@ void composite_disconnect(struct usb_gadget *gadget)
|
||||||
* disconnect callbacks?
|
* disconnect callbacks?
|
||||||
*/
|
*/
|
||||||
spin_lock_irqsave(&cdev->lock, flags);
|
spin_lock_irqsave(&cdev->lock, flags);
|
||||||
|
cdev->suspended = 0;
|
||||||
if (cdev->config)
|
if (cdev->config)
|
||||||
reset_config(cdev);
|
reset_config(cdev);
|
||||||
if (cdev->driver->disconnect)
|
if (cdev->driver->disconnect)
|
||||||
|
|
Loading…
Reference in New Issue