]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/usb/gadget/mass_storage.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
[karo-tx-linux.git] / drivers / usb / gadget / mass_storage.c
index 2b11e20798234b38ac0e61530744c1d15890d3ae..585f2559484dfe3dc1ece40d0643d2b422dc7945 100644 (file)
@@ -141,8 +141,11 @@ static int msg_thread_exits(struct fsg_common *common)
        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;
@@ -155,7 +158,7 @@ static int __init msg_do_config(struct usb_configuration *c)
        }
 
        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))
@@ -179,7 +182,7 @@ static struct usb_configuration msg_config_driver = {
 /****************************** 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;