diff options
Diffstat (limited to 'drivers/usb/gadget/printer.c')
-rw-r--r-- | drivers/usb/gadget/printer.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/usb/gadget/printer.c b/drivers/usb/gadget/printer.c index 327a92a137b4..2fc8636316c5 100644 --- a/drivers/usb/gadget/printer.c +++ b/drivers/usb/gadget/printer.c | |||
@@ -1348,7 +1348,7 @@ printer_unbind(struct usb_gadget *gadget) | |||
1348 | set_gadget_data(gadget, NULL); | 1348 | set_gadget_data(gadget, NULL); |
1349 | } | 1349 | } |
1350 | 1350 | ||
1351 | static int __ref | 1351 | static int __init |
1352 | printer_bind(struct usb_gadget *gadget) | 1352 | printer_bind(struct usb_gadget *gadget) |
1353 | { | 1353 | { |
1354 | struct printer_dev *dev; | 1354 | struct printer_dev *dev; |
@@ -1544,7 +1544,6 @@ static struct usb_gadget_driver printer_driver = { | |||
1544 | .speed = DEVSPEED, | 1544 | .speed = DEVSPEED, |
1545 | 1545 | ||
1546 | .function = (char *) driver_desc, | 1546 | .function = (char *) driver_desc, |
1547 | .bind = printer_bind, | ||
1548 | .unbind = printer_unbind, | 1547 | .unbind = printer_unbind, |
1549 | 1548 | ||
1550 | .setup = printer_setup, | 1549 | .setup = printer_setup, |
@@ -1580,11 +1579,11 @@ init(void) | |||
1580 | return status; | 1579 | return status; |
1581 | } | 1580 | } |
1582 | 1581 | ||
1583 | status = usb_gadget_register_driver(&printer_driver); | 1582 | status = usb_gadget_probe_driver(&printer_driver, printer_bind); |
1584 | if (status) { | 1583 | if (status) { |
1585 | class_destroy(usb_gadget_class); | 1584 | class_destroy(usb_gadget_class); |
1586 | unregister_chrdev_region(g_printer_devno, 1); | 1585 | unregister_chrdev_region(g_printer_devno, 1); |
1587 | DBG(dev, "usb_gadget_register_driver %x\n", status); | 1586 | DBG(dev, "usb_gadget_probe_driver %x\n", status); |
1588 | } | 1587 | } |
1589 | 1588 | ||
1590 | return status; | 1589 | return status; |