usb: gadget: android: follow proper order on disconnect
authorDima Zavin <dima@android.com>
Wed, 14 Sep 2011 18:53:11 +0000 (11:53 -0700)
committerDan Willemsen <dwillemsen@nvidia.com>
Thu, 1 Dec 2011 05:39:05 +0000 (21:39 -0800)
commit1fdcc7a46a0306d61de07ef861cfc0166f9603c0
tree3ee529c285735af3a8adad21f88d48388b88586c
parent672c2230765dbe06918ee9ac8495a6337df81a0c
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