diff options
Diffstat (limited to 'drivers/usb/gadget/pxa25x_udc.c')
-rw-r--r-- | drivers/usb/gadget/pxa25x_udc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/usb/gadget/pxa25x_udc.c b/drivers/usb/gadget/pxa25x_udc.c index be5fb34d9602..b37f92cb71bc 100644 --- a/drivers/usb/gadget/pxa25x_udc.c +++ b/drivers/usb/gadget/pxa25x_udc.c | |||
@@ -1280,14 +1280,15 @@ static void udc_enable (struct pxa25x_udc *dev) | |||
1280 | * disconnect is reported. then a host may connect again, or | 1280 | * disconnect is reported. then a host may connect again, or |
1281 | * the driver might get unbound. | 1281 | * the driver might get unbound. |
1282 | */ | 1282 | */ |
1283 | int usb_gadget_register_driver(struct usb_gadget_driver *driver) | 1283 | int usb_gadget_probe_driver(struct usb_gadget_driver *driver, |
1284 | int (*bind)(struct usb_gadget *)) | ||
1284 | { | 1285 | { |
1285 | struct pxa25x_udc *dev = the_controller; | 1286 | struct pxa25x_udc *dev = the_controller; |
1286 | int retval; | 1287 | int retval; |
1287 | 1288 | ||
1288 | if (!driver | 1289 | if (!driver |
1289 | || driver->speed < USB_SPEED_FULL | 1290 | || driver->speed < USB_SPEED_FULL |
1290 | || !driver->bind | 1291 | || !bind |
1291 | || !driver->disconnect | 1292 | || !driver->disconnect |
1292 | || !driver->setup) | 1293 | || !driver->setup) |
1293 | return -EINVAL; | 1294 | return -EINVAL; |
@@ -1308,7 +1309,7 @@ fail: | |||
1308 | dev->gadget.dev.driver = NULL; | 1309 | dev->gadget.dev.driver = NULL; |
1309 | return retval; | 1310 | return retval; |
1310 | } | 1311 | } |
1311 | retval = driver->bind(&dev->gadget); | 1312 | retval = bind(&dev->gadget); |
1312 | if (retval) { | 1313 | if (retval) { |
1313 | DMSG("bind to driver %s --> error %d\n", | 1314 | DMSG("bind to driver %s --> error %d\n", |
1314 | driver->driver.name, retval); | 1315 | driver->driver.name, retval); |
@@ -1338,7 +1339,7 @@ fail: | |||
1338 | bind_fail: | 1339 | bind_fail: |
1339 | return retval; | 1340 | return retval; |
1340 | } | 1341 | } |
1341 | EXPORT_SYMBOL(usb_gadget_register_driver); | 1342 | EXPORT_SYMBOL(usb_gadget_probe_driver); |
1342 | 1343 | ||
1343 | static void | 1344 | static void |
1344 | stop_activity(struct pxa25x_udc *dev, struct usb_gadget_driver *driver) | 1345 | stop_activity(struct pxa25x_udc *dev, struct usb_gadget_driver *driver) |