Merge "usb: f_fs: Prevent gadget unbind if it is already unbound"
This commit is contained in:
commit
c5ce2f64ad
2 changed files with 382 additions and 8 deletions
|
@ -1738,7 +1738,10 @@ void unregister_gadget_item(struct config_item *item)
|
|||
{
|
||||
struct gadget_info *gi = to_gadget_info(item);
|
||||
|
||||
/* to protect race with gadget_dev_desc_UDC_store*/
|
||||
mutex_lock(&gi->lock);
|
||||
unregister_gadget(gi);
|
||||
mutex_unlock(&gi->lock);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(unregister_gadget_item);
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue