hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/usb/gadget/legacy/mass_storage.c
....@@ -105,15 +105,12 @@
105105
106106 static int msg_do_config(struct usb_configuration *c)
107107 {
108
- struct fsg_opts *opts;
109108 int ret;
110109
111110 if (gadget_is_otg(c->cdev->gadget)) {
112111 c->descriptors = otg_desc;
113112 c->bmAttributes |= USB_CONFIG_ATT_WAKEUP;
114113 }
115
-
116
- opts = fsg_opts_from_func_inst(fi_msg);
117114
118115 f_msg = usb_get_function(fi_msg);
119116 if (IS_ERR(f_msg))
....@@ -232,18 +229,8 @@
232229 .unbind = msg_unbind,
233230 };
234231
232
+module_usb_composite_driver(msg_driver);
233
+
235234 MODULE_DESCRIPTION(DRIVER_DESC);
236235 MODULE_AUTHOR("Michal Nazarewicz");
237236 MODULE_LICENSE("GPL");
238
-
239
-static int __init msg_init(void)
240
-{
241
- return usb_composite_probe(&msg_driver);
242
-}
243
-module_init(msg_init);
244
-
245
-static void __exit msg_cleanup(void)
246
-{
247
- usb_composite_unregister(&msg_driver);
248
-}
249
-module_exit(msg_cleanup);