diff options
Diffstat (limited to 'drivers/usb/gadget/at91_udc.c')
-rw-r--r-- | drivers/usb/gadget/at91_udc.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c index 93ead19507b6..387e503b9d14 100644 --- a/drivers/usb/gadget/at91_udc.c +++ b/drivers/usb/gadget/at91_udc.c | |||
@@ -1628,7 +1628,8 @@ static void at91_vbus_timer(unsigned long data) | |||
1628 | schedule_work(&udc->vbus_timer_work); | 1628 | schedule_work(&udc->vbus_timer_work); |
1629 | } | 1629 | } |
1630 | 1630 | ||
1631 | int usb_gadget_register_driver (struct usb_gadget_driver *driver) | 1631 | int usb_gadget_probe_driver(struct usb_gadget_driver *driver, |
1632 | int (*bind)(struct usb_gadget *)) | ||
1632 | { | 1633 | { |
1633 | struct at91_udc *udc = &controller; | 1634 | struct at91_udc *udc = &controller; |
1634 | int retval; | 1635 | int retval; |
@@ -1636,7 +1637,7 @@ int usb_gadget_register_driver (struct usb_gadget_driver *driver) | |||
1636 | 1637 | ||
1637 | if (!driver | 1638 | if (!driver |
1638 | || driver->speed < USB_SPEED_FULL | 1639 | || driver->speed < USB_SPEED_FULL |
1639 | || !driver->bind | 1640 | || !bind |
1640 | || !driver->setup) { | 1641 | || !driver->setup) { |
1641 | DBG("bad parameter.\n"); | 1642 | DBG("bad parameter.\n"); |
1642 | return -EINVAL; | 1643 | return -EINVAL; |
@@ -1653,9 +1654,9 @@ int usb_gadget_register_driver (struct usb_gadget_driver *driver) | |||
1653 | udc->enabled = 1; | 1654 | udc->enabled = 1; |
1654 | udc->selfpowered = 1; | 1655 | udc->selfpowered = 1; |
1655 | 1656 | ||
1656 | retval = driver->bind(&udc->gadget); | 1657 | retval = bind(&udc->gadget); |
1657 | if (retval) { | 1658 | if (retval) { |
1658 | DBG("driver->bind() returned %d\n", retval); | 1659 | DBG("bind() returned %d\n", retval); |
1659 | udc->driver = NULL; | 1660 | udc->driver = NULL; |
1660 | udc->gadget.dev.driver = NULL; | 1661 | udc->gadget.dev.driver = NULL; |
1661 | dev_set_drvdata(&udc->gadget.dev, NULL); | 1662 | dev_set_drvdata(&udc->gadget.dev, NULL); |
@@ -1671,7 +1672,7 @@ int usb_gadget_register_driver (struct usb_gadget_driver *driver) | |||
1671 | DBG("bound to %s\n", driver->driver.name); | 1672 | DBG("bound to %s\n", driver->driver.name); |
1672 | return 0; | 1673 | return 0; |
1673 | } | 1674 | } |
1674 | EXPORT_SYMBOL (usb_gadget_register_driver); | 1675 | EXPORT_SYMBOL(usb_gadget_probe_driver); |
1675 | 1676 | ||
1676 | int usb_gadget_unregister_driver (struct usb_gadget_driver *driver) | 1677 | int usb_gadget_unregister_driver (struct usb_gadget_driver *driver) |
1677 | { | 1678 | { |