UPSTREAM: usb: dwc3: gadget: Fix suspend/resume during device mode
authorRoger Quadros <rogerq@ti.com>
Tue, 12 Apr 2016 08:33:29 +0000 (11:33 +0300)
committerHuang, Tao <huangtao@rock-chips.com>
Tue, 16 Aug 2016 12:48:19 +0000 (20:48 +0800)
commit2442353fc0e3cd9b88b0af908c8cfa4bf518f483
tree4b6fcb0d418eb213a624ab6930afd222a7a7f97c
parent324860a4337d95eba3080482a7691671497e017e
UPSTREAM: usb: dwc3: gadget: Fix suspend/resume during device mode

Gadget controller might not be always active during system
suspend/resume as gadget driver might not have yet been loaded or
might have been unloaded prior to system suspend.

Check if we're active and only then perform
necessary actions during suspend/resume.

Change-Id: I1efb16ec3b2d1c32904c7bcc8cc947d266786e20
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
(cherry picked from commit 9772b47a4c2916d645c551228b6085ea24acbe5d)
drivers/usb/dwc3/gadget.c