Skip to content
Snippets Groups Projects
Commit 64bef932 authored by Mike Lockwood's avatar Mike Lockwood Committed by Dima Zavin
Browse files

USB: gadget: f_accessory: Clear disconnected flag when driver file is opened


Fixes a race condition that can occur when entering accessory mode.

Signed-off-by: default avatarMike Lockwood <lockwood@android.com>
parent 6f992b5f
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment