UPSTREAM: usb: dwc3: gadget: Add the suspend state checking when stopping gadget
authorBaolin Wang <baolin.wang@linaro.org>
Mon, 20 Jun 2016 08:19:48 +0000 (16:19 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Tue, 16 Aug 2016 12:48:19 +0000 (20:48 +0800)
commit60a24e9f08d5c3758f604a26fff7096ffd4c0fcd
tree591d0a0c3096f5641f6de7883816891b9ddf16be
parent1360b6f0941cf79dea4b6ae758340399ef9ca744
UPSTREAM: usb: dwc3: gadget: Add the suspend state checking when stopping gadget

It will be crash to stop gadget when the dwc3 device had been into suspend
state, thus we need to check if the dwc3 device had been into suspend state
when UDC try to stop gadget.

Change-Id: I1a49d4c52131ef4b4357d4a12b5da55e8127d750
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
(cherry picked from commit da1410be21bfedd16740aee6d772e669cf4e852f)
drivers/usb/dwc3/gadget.c