projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
30e18b8
)
USB: gadget: f_accessory: Clear disconnected flag when driver file is opened
author
Mike Lockwood
<lockwood@android.com>
Sun, 13 Mar 2011 02:35:28 +0000
(21:35 -0500)
committer
Mike Lockwood
<lockwood@android.com>
Sun, 13 Mar 2011 02:35:28 +0000
(21:35 -0500)
Fixes a race condition that can occur when entering accessory mode.
Signed-off-by: Mike Lockwood <lockwood@android.com>
drivers/usb/gadget/f_accessory.c
patch
|
blob
|
history
diff --git
a/drivers/usb/gadget/f_accessory.c
b/drivers/usb/gadget/f_accessory.c
index f6a5922e8c3b7f4621c69df3152f3e43ad0bc6b5..baeae5976b66194bb660a63fd4833d711765fe9e 100644
(file)
--- a/
drivers/usb/gadget/f_accessory.c
+++ b/
drivers/usb/gadget/f_accessory.c
@@
-521,6
+521,7
@@
static int acc_open(struct inode *ip, struct file *fp)
if (atomic_xchg(&_acc_dev->open_excl, 1))
return -EBUSY;
+ _acc_dev->disconnected = 0;
fp->private_data = _acc_dev;
return 0;
}