diff options
Diffstat (limited to 'drivers/usb/gadget/imx_udc.c')
-rw-r--r-- | drivers/usb/gadget/imx_udc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/usb/gadget/imx_udc.c b/drivers/usb/gadget/imx_udc.c index e743122fcd93..ed0266462c57 100644 --- a/drivers/usb/gadget/imx_udc.c +++ b/drivers/usb/gadget/imx_udc.c | |||
@@ -1319,14 +1319,15 @@ static struct imx_udc_struct controller = { | |||
1319 | * USB gadged driver functions | 1319 | * USB gadged driver functions |
1320 | ******************************************************************************* | 1320 | ******************************************************************************* |
1321 | */ | 1321 | */ |
1322 | int usb_gadget_register_driver(struct usb_gadget_driver *driver) | 1322 | int usb_gadget_probe_driver(struct usb_gadget_driver *driver, |
1323 | int (*bind)(struct usb_gadget *)) | ||
1323 | { | 1324 | { |
1324 | struct imx_udc_struct *imx_usb = &controller; | 1325 | struct imx_udc_struct *imx_usb = &controller; |
1325 | int retval; | 1326 | int retval; |
1326 | 1327 | ||
1327 | if (!driver | 1328 | if (!driver |
1328 | || driver->speed < USB_SPEED_FULL | 1329 | || driver->speed < USB_SPEED_FULL |
1329 | || !driver->bind | 1330 | || !bind |
1330 | || !driver->disconnect | 1331 | || !driver->disconnect |
1331 | || !driver->setup) | 1332 | || !driver->setup) |
1332 | return -EINVAL; | 1333 | return -EINVAL; |
@@ -1342,7 +1343,7 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver) | |||
1342 | retval = device_add(&imx_usb->gadget.dev); | 1343 | retval = device_add(&imx_usb->gadget.dev); |
1343 | if (retval) | 1344 | if (retval) |
1344 | goto fail; | 1345 | goto fail; |
1345 | retval = driver->bind(&imx_usb->gadget); | 1346 | retval = bind(&imx_usb->gadget); |
1346 | if (retval) { | 1347 | if (retval) { |
1347 | D_ERR(imx_usb->dev, "<%s> bind to driver %s --> error %d\n", | 1348 | D_ERR(imx_usb->dev, "<%s> bind to driver %s --> error %d\n", |
1348 | __func__, driver->driver.name, retval); | 1349 | __func__, driver->driver.name, retval); |
@@ -1362,7 +1363,7 @@ fail: | |||
1362 | imx_usb->gadget.dev.driver = NULL; | 1363 | imx_usb->gadget.dev.driver = NULL; |
1363 | return retval; | 1364 | return retval; |
1364 | } | 1365 | } |
1365 | EXPORT_SYMBOL(usb_gadget_register_driver); | 1366 | EXPORT_SYMBOL(usb_gadget_probe_driver); |
1366 | 1367 | ||
1367 | int usb_gadget_unregister_driver(struct usb_gadget_driver *driver) | 1368 | int usb_gadget_unregister_driver(struct usb_gadget_driver *driver) |
1368 | { | 1369 | { |