usb: gadget: android: follow proper order on disconnect
authorDima Zavin <dima@android.com>
Wed, 14 Sep 2011 18:53:11 +0000 (11:53 -0700)
committerDima Zavin <dima@android.com>
Wed, 14 Sep 2011 20:43:19 +0000 (13:43 -0700)
commit21bad758ae85ca6043d55ed7877946e94d6cc1c7
tree4d2fc98797549425e8683972ff7ceeef076493b4
parent7cfb88fe76b676b3db5a0931c1245bbe640de8db
usb: gadget: android: follow proper order on disconnect

We should composite_disconnect *before* updating our internal
state and sending uevent to userspace.
Also, hold cdev->lock while updating internal state.

Change-Id: If66a5a4f7d4a102a44aefc3ce4a154a5a1517dcf
Signed-off-by: Dima Zavin <dima@android.com>
drivers/usb/gadget/android.c