USB: gadget: ADB: Add online checking in adb_write function
BZ: 26739
If adb write after unbinding, it will be waiting all the time.
So add online checking to exit the blocking. Or else adb write
will return busy at the second time.
Change-Id: I0fd1bae127fc652e92d89121722f92289ca9e70d
Signed-off-by: Wu, Hao <hao.wu@intel.com>
Signed-off-by: Liu, DongxingX <dongxingx.liu@intel.com>
Reviewed-on: http://android.intel.com:8080/39479
Reviewed-by: Zhuang, Jin Can <jin.can.zhuang@intel.com>
Reviewed-by: Meng, Zhe <zhe.meng@intel.com>
Tested-by: Meng, Zhe <zhe.meng@intel.com>
Reviewed-by: Tang, Richard <richard.tang@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>