Merge "usb: gadget: mtp: Move mutex_init() to alloc_inst_mtp_ptp()"
This commit is contained in:
commit
83384a6076
1 changed files with 2 additions and 1 deletions
|
@ -1854,6 +1854,8 @@ struct usb_function_instance *alloc_inst_mtp_ptp(bool mtp_config)
|
||||||
config_group_init_type_name(&fi_mtp->func_inst.group,
|
config_group_init_type_name(&fi_mtp->func_inst.group,
|
||||||
"", &mtp_func_type);
|
"", &mtp_func_type);
|
||||||
|
|
||||||
|
mutex_init(&fi_mtp->dev->read_mutex);
|
||||||
|
|
||||||
return &fi_mtp->func_inst;
|
return &fi_mtp->func_inst;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(alloc_inst_mtp_ptp);
|
EXPORT_SYMBOL_GPL(alloc_inst_mtp_ptp);
|
||||||
|
@ -1916,7 +1918,6 @@ struct usb_function *function_alloc_mtp_ptp(struct usb_function_instance *fi,
|
||||||
dev->is_ptp = !mtp_config;
|
dev->is_ptp = !mtp_config;
|
||||||
fi->f = &dev->function;
|
fi->f = &dev->function;
|
||||||
|
|
||||||
mutex_init(&dev->read_mutex);
|
|
||||||
return &dev->function;
|
return &dev->function;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(function_alloc_mtp_ptp);
|
EXPORT_SYMBOL_GPL(function_alloc_mtp_ptp);
|
||||||
|
|
Loading…
Add table
Reference in a new issue