summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/composite.c
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2012-09-06 20:11:04 +0200
committerFelipe Balbi <balbi@ti.com>2012-09-10 15:34:48 +0300
commit03e42bd5937c4c24e411690ab165627e93c258b5 (patch)
treeb28ce26b26167ceeb4d3dc83dc424fd2e2ecb973 /drivers/usb/gadget/composite.c
parentc2ec75c25112c9e0d9053f55ba8cf0a358d4a354 (diff)
downloadop-kernel-dev-03e42bd5937c4c24e411690ab165627e93c258b5.zip
op-kernel-dev-03e42bd5937c4c24e411690ab165627e93c258b5.tar.gz
usb: gadget: move bind() callback back to struct usb_composite_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 structs in question via __ref. Cc: devel@driverdev.osuosl.org 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/composite.c')
-rw-r--r--drivers/usb/gadget/composite.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index 402e5bd..071d15c 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -1617,12 +1617,9 @@ static struct usb_gadget_driver composite_driver = {
* while it was binding. That would usually be done in order to wait for
* some userspace participation.
*/
-int usb_composite_probe(struct usb_composite_driver *driver,
- int (*bind)(struct usb_composite_dev *cdev))
+int usb_composite_probe(struct usb_composite_driver *driver)
{
- if (!driver || !driver->dev || composite)
- return -EINVAL;
- if (!bind && !driver->bind)
+ if (!driver || !driver->dev || composite || !driver->bind)
return -EINVAL;
if (!driver->name)
@@ -1633,8 +1630,6 @@ int usb_composite_probe(struct usb_composite_driver *driver,
composite_driver.driver.name = driver->name;
composite_driver.max_speed = driver->max_speed;
composite = driver;
- if (!driver->bind)
- driver->bind = bind;
return usb_gadget_probe_driver(&composite_driver, composite_bind);
}
OpenPOWER on IntegriCloud