return 0;
}
-static int __init msg_do_config(struct usb_configuration *c)
+static int __ref msg_do_config(struct usb_configuration *c)
{
+ static const struct fsg_operations ops = {
+ .thread_exits = msg_thread_exits,
+ };
static struct fsg_common common;
struct fsg_common *retp;
}
fsg_config_from_params(&config, &mod_data);
- config.thread_exits = msg_thread_exits;
+ config.ops = &ops;
retp = fsg_common_init(&common, c->cdev, &config);
if (IS_ERR(retp))
/****************************** Gadget Bind ******************************/
-static int __init msg_bind(struct usb_composite_dev *cdev)
+static int __ref msg_bind(struct usb_composite_dev *cdev)
{
struct usb_gadget *gadget = cdev->gadget;
int status;