diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2012-09-06 20:11:05 +0200 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-09-10 15:35:16 +0300 |
commit | 93952956c7078eb41058c5ccc5b34ae6cf59bb64 (patch) | |
tree | 99f00baae3db9f776e8518525502a464f5a9c4f4 /drivers/usb/gadget/udc-core.c | |
parent | 03e42bd5937c4c24e411690ab165627e93c258b5 (diff) | |
download | op-kernel-dev-93952956c7078eb41058c5ccc5b34ae6cf59bb64.zip op-kernel-dev-93952956c7078eb41058c5ccc5b34ae6cf59bb64.tar.gz |
usb: gadget: move bind() callback back to struct usb_gadget_driver
This partly reverts 07a18bd7 ("usb gadget: don't save bind callback in
struct usb_composite_driver") and fixes new drivers. The section missmatch
problems was solved by whitelisting bind callback in modpost.
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/udc-core.c')
-rw-r--r-- | drivers/usb/gadget/udc-core.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/usb/gadget/udc-core.c b/drivers/usb/gadget/udc-core.c index bae243c..85e1e2fd 100644 --- a/drivers/usb/gadget/udc-core.c +++ b/drivers/usb/gadget/udc-core.c @@ -311,13 +311,12 @@ EXPORT_SYMBOL_GPL(usb_del_gadget_udc); /* ------------------------------------------------------------------------- */ -int usb_gadget_probe_driver(struct usb_gadget_driver *driver, - int (*bind)(struct usb_gadget *)) +int usb_gadget_probe_driver(struct usb_gadget_driver *driver) { struct usb_udc *udc = NULL; int ret; - if (!driver || !bind || !driver->setup) + if (!driver || !driver->bind || !driver->setup) return -EINVAL; mutex_lock(&udc_lock); @@ -339,7 +338,7 @@ found: udc->dev.driver = &driver->driver; if (udc_is_newstyle(udc)) { - ret = bind(udc->gadget); + ret = driver->bind(udc->gadget); if (ret) goto err1; ret = usb_gadget_udc_start(udc->gadget, driver); @@ -350,7 +349,7 @@ found: usb_gadget_connect(udc->gadget); } else { - ret = usb_gadget_start(udc->gadget, driver, bind); + ret = usb_gadget_start(udc->gadget, driver, driver->bind); if (ret) goto err1; |