dwc3: gadget: Allow system to perform suspend if gadget driver is removed
authorKishon Vijay Abraham I <kishon@ti.com>
Wed, 21 Mar 2012 09:09:18 +0000 (14:39 +0530)
committerKishon Vijay Abraham I <kishon@ti.com>
Thu, 22 Mar 2012 11:26:30 +0000 (16:56 +0530)
commit34846b3544ff3f45841f35311d0db980cd24a9bd
treeed32278a7256ad1e5c6706aad45b12c0ecf65ea3
parent770b958d2d6e9a1f0e1e2d2be3ea51cf0af596e3
dwc3: gadget: Allow system to perform suspend if gadget driver is removed

The _is_active_ flag in dwc3/gadget is used to determine if the system can
enter low power state. Previously the _is_active_ flag was set in conndone
interrupt and reset in disconnect interrupt.

However for the case where we have the device already enumerated and then
we remove gadget driver (rmmod g_zero), we dont get disconnect interrupt
and _is_active_ flag will have a wrong status. So _is_active_ flag is reset
in gadget_stop.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/usb/dwc3/gadget.c