Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 42748684 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: gadget: mtp: Move mutex_init() to alloc_inst_mtp_ptp()"

parents d6a847bc 56703d11
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1826,6 +1826,8 @@ struct usb_function_instance *alloc_inst_mtp_ptp(bool mtp_config)
	usb_os_desc_prepare_interf_dir(&fi_mtp->func_inst.group, 1,
					descs, names, THIS_MODULE);

	mutex_init(&fi_mtp->dev->read_mutex);

	return  &fi_mtp->func_inst;
}
EXPORT_SYMBOL_GPL(alloc_inst_mtp_ptp);
@@ -1887,7 +1889,6 @@ struct usb_function *function_alloc_mtp_ptp(struct usb_function_instance *fi,
	dev->function.free_func = mtp_free;
	fi->f = &dev->function;

	mutex_init(&dev->read_mutex);
	return &dev->function;
}
EXPORT_SYMBOL_GPL(function_alloc_mtp_ptp);