Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
[sfrench/cifs-2.6.git] / drivers / usb / gadget / printer.c
index 327a92a137b4613d76b1838e742177d7f931c6fe..2fc8636316c550eb8019799e99299e5551f2aac0 100644 (file)
@@ -1348,7 +1348,7 @@ printer_unbind(struct usb_gadget *gadget)
        set_gadget_data(gadget, NULL);
 }
 
-static int __ref
+static int __init
 printer_bind(struct usb_gadget *gadget)
 {
        struct printer_dev      *dev;
@@ -1544,7 +1544,6 @@ static struct usb_gadget_driver printer_driver = {
        .speed          = DEVSPEED,
 
        .function       = (char *) driver_desc,
-       .bind           = printer_bind,
        .unbind         = printer_unbind,
 
        .setup          = printer_setup,
@@ -1580,11 +1579,11 @@ init(void)
                return status;
        }
 
-       status = usb_gadget_register_driver(&printer_driver);
+       status = usb_gadget_probe_driver(&printer_driver, printer_bind);
        if (status) {
                class_destroy(usb_gadget_class);
                unregister_chrdev_region(g_printer_devno, 1);
-               DBG(dev, "usb_gadget_register_driver %x\n", status);
+               DBG(dev, "usb_gadget_probe_driver %x\n", status);
        }
 
        return status;