dwc3: gadget: protect access to _is_connected_ flag in dwc gadget
authorKishon Vijay Abraham I <kishon@ti.com>
Wed, 21 Mar 2012 08:34:12 +0000 (14:04 +0530)
committerKishon Vijay Abraham I <kishon@ti.com>
Thu, 22 Mar 2012 11:26:22 +0000 (16:56 +0530)
commit2d5dde30a7376f0193b0f7000e53e60ee214aca6
tree958aaf2379a90ced9535529177d0d3962a23db3d
parentb823dfd5dcc4902160358e5c4600c0aa650c9b3b
dwc3: gadget: protect access to _is_connected_ flag in dwc gadget

The is_connected flag in dwc3/gadget.c is used to check if the cable is
connected (even before insmoding gadget_driver), and enumerate the device
if it is already connected.
It should be protected because the is_connected flag can be modified
during connect/disconnect event.

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