diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2019-07-26 14:59:03 +1000 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2019-08-12 08:55:24 +0300 |
commit | 602fda17c7356bb7ae98467d93549057481d11dd (patch) | |
tree | 0e17f55cfee73041806a4017d47ffe93700f4eac /drivers | |
parent | 5dac665cf403967bb79a7aeb8c182a621fe617ff (diff) | |
download | lwn-602fda17c7356bb7ae98467d93549057481d11dd.tar.gz lwn-602fda17c7356bb7ae98467d93549057481d11dd.zip |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/gadget/composite.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index 9118b42c70b6..76883ff4f5bb 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -1976,6 +1976,7 @@ void composite_disconnect(struct usb_gadget *gadget) * disconnect callbacks? */ spin_lock_irqsave(&cdev->lock, flags); + cdev->suspended = 0; if (cdev->config) reset_config(cdev); if (cdev->driver->disconnect) |