aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/s3c2410_udc.c
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2012-09-07 09:53:17 +0200
committerFelipe Balbi <balbi@ti.com>2012-09-10 15:35:41 +0300
commitffe0b335062505a98d7296dae2c2a197713f87e0 (patch)
treec2fe75a9711026ee65409034dd71579bad64a801 /drivers/usb/gadget/s3c2410_udc.c
parente220ff75db3c1195814c2ad5ada11f71b011d000 (diff)
downloadkernel_goldelico_gta04-ffe0b335062505a98d7296dae2c2a197713f87e0.zip
kernel_goldelico_gta04-ffe0b335062505a98d7296dae2c2a197713f87e0.tar.gz
kernel_goldelico_gta04-ffe0b335062505a98d7296dae2c2a197713f87e0.tar.bz2
usb: gadget: remove global variable composite in composite.c
This patch removes the global variable composite in composite.c. The private data which was saved there is now passed via an additional argument to the bind() function in struct usb_gadget_driver. Only the "old-style" UDC drivers have to be touched here, new style are doing it right because this change is made in udc-core. 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/s3c2410_udc.c')
-rw-r--r--drivers/usb/gadget/s3c2410_udc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/gadget/s3c2410_udc.c b/drivers/usb/gadget/s3c2410_udc.c
index b627c9b..c33e942 100644
--- a/drivers/usb/gadget/s3c2410_udc.c
+++ b/drivers/usb/gadget/s3c2410_udc.c
@@ -1539,7 +1539,7 @@ static int s3c2410_vbus_draw(struct usb_gadget *_gadget, unsigned ma)
}
static int s3c2410_udc_start(struct usb_gadget_driver *driver,
- int (*bind)(struct usb_gadget *));
+ int (*bind)(struct usb_gadget *, struct usb_gadget_driver *));
static int s3c2410_udc_stop(struct usb_gadget_driver *driver);
static const struct usb_gadget_ops s3c2410_ops = {
@@ -1665,7 +1665,7 @@ static void s3c2410_udc_enable(struct s3c2410_udc *dev)
}
static int s3c2410_udc_start(struct usb_gadget_driver *driver,
- int (*bind)(struct usb_gadget *))
+ int (*bind)(struct usb_gadget *, struct usb_gadget_driver *))
{
struct s3c2410_udc *udc = the_controller;
int retval;
@@ -1705,7 +1705,7 @@ static int s3c2410_udc_start(struct usb_gadget_driver *driver,
dprintk(DEBUG_NORMAL, "binding gadget driver '%s'\n",
driver->driver.name);
- retval = bind(&udc->gadget);
+ retval = bind(&udc->gadget, driver);
if (retval) {
device_del(&udc->gadget.dev);
goto register_error;