aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/lh7a40x_udc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget/lh7a40x_udc.c')
-rw-r--r--drivers/usb/gadget/lh7a40x_udc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/usb/gadget/lh7a40x_udc.c b/drivers/usb/gadget/lh7a40x_udc.c
index fded3fca793b..6b58bd8ce623 100644
--- a/drivers/usb/gadget/lh7a40x_udc.c
+++ b/drivers/usb/gadget/lh7a40x_udc.c
@@ -408,7 +408,8 @@ static void udc_enable(struct lh7a40x_udc *dev)
408/* 408/*
409 Register entry point for the peripheral controller driver. 409 Register entry point for the peripheral controller driver.
410*/ 410*/
411int usb_gadget_register_driver(struct usb_gadget_driver *driver) 411int usb_gadget_probe_driver(struct usb_gadget_driver *driver,
412 int (*bind)(struct usb_gadget *))
412{ 413{
413 struct lh7a40x_udc *dev = the_controller; 414 struct lh7a40x_udc *dev = the_controller;
414 int retval; 415 int retval;
@@ -417,7 +418,7 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver)
417 418
418 if (!driver 419 if (!driver
419 || driver->speed != USB_SPEED_FULL 420 || driver->speed != USB_SPEED_FULL
420 || !driver->bind 421 || !bind
421 || !driver->disconnect 422 || !driver->disconnect
422 || !driver->setup) 423 || !driver->setup)
423 return -EINVAL; 424 return -EINVAL;
@@ -431,7 +432,7 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver)
431 dev->gadget.dev.driver = &driver->driver; 432 dev->gadget.dev.driver = &driver->driver;
432 433
433 device_add(&dev->gadget.dev); 434 device_add(&dev->gadget.dev);
434 retval = driver->bind(&dev->gadget); 435 retval = bind(&dev->gadget);
435 if (retval) { 436 if (retval) {
436 printk(KERN_WARNING "%s: bind to driver %s --> error %d\n", 437 printk(KERN_WARNING "%s: bind to driver %s --> error %d\n",
437 dev->gadget.name, driver->driver.name, retval); 438 dev->gadget.name, driver->driver.name, retval);
@@ -453,8 +454,7 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver)
453 454
454 return 0; 455 return 0;
455} 456}
456 457EXPORT_SYMBOL(usb_gadget_probe_driver);
457EXPORT_SYMBOL(usb_gadget_register_driver);
458 458
459/* 459/*
460 Unregister entry point for the peripheral controller driver. 460 Unregister entry point for the peripheral controller driver.