aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/pch_udc.c
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2012-09-07 03:53:17 -0400
committerFelipe Balbi <balbi@ti.com>2012-09-10 08:35:41 -0400
commitffe0b335062505a98d7296dae2c2a197713f87e0 (patch)
treec2fe75a9711026ee65409034dd71579bad64a801 /drivers/usb/gadget/pch_udc.c
parente220ff75db3c1195814c2ad5ada11f71b011d000 (diff)
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/pch_udc.c')
-rw-r--r--drivers/usb/gadget/pch_udc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/gadget/pch_udc.c b/drivers/usb/gadget/pch_udc.c
index f4fb71c9ae08..6490c0040e3a 100644
--- a/drivers/usb/gadget/pch_udc.c
+++ b/drivers/usb/gadget/pch_udc.c
@@ -1236,7 +1236,7 @@ static int pch_udc_pcd_vbus_draw(struct usb_gadget *gadget, unsigned int mA)
1236} 1236}
1237 1237
1238static int pch_udc_start(struct usb_gadget_driver *driver, 1238static int pch_udc_start(struct usb_gadget_driver *driver,
1239 int (*bind)(struct usb_gadget *)); 1239 int (*bind)(struct usb_gadget *, struct usb_gadget_driver *));
1240static int pch_udc_stop(struct usb_gadget_driver *driver); 1240static int pch_udc_stop(struct usb_gadget_driver *driver);
1241static const struct usb_gadget_ops pch_udc_ops = { 1241static const struct usb_gadget_ops pch_udc_ops = {
1242 .get_frame = pch_udc_pcd_get_frame, 1242 .get_frame = pch_udc_pcd_get_frame,
@@ -2982,7 +2982,7 @@ static int init_dma_pools(struct pch_udc_dev *dev)
2982} 2982}
2983 2983
2984static int pch_udc_start(struct usb_gadget_driver *driver, 2984static int pch_udc_start(struct usb_gadget_driver *driver,
2985 int (*bind)(struct usb_gadget *)) 2985 int (*bind)(struct usb_gadget *, struct usb_gadget_driver *))
2986{ 2986{
2987 struct pch_udc_dev *dev = pch_udc; 2987 struct pch_udc_dev *dev = pch_udc;
2988 int retval; 2988 int retval;
@@ -3006,7 +3006,7 @@ static int pch_udc_start(struct usb_gadget_driver *driver,
3006 dev->gadget.dev.driver = &driver->driver; 3006 dev->gadget.dev.driver = &driver->driver;
3007 3007
3008 /* Invoke the bind routine of the gadget driver */ 3008 /* Invoke the bind routine of the gadget driver */
3009 retval = bind(&dev->gadget); 3009 retval = bind(&dev->gadget, driver);
3010 3010
3011 if (retval) { 3011 if (retval) {
3012 dev_err(&dev->pdev->dev, "%s: binding to %s returning %d\n", 3012 dev_err(&dev->pdev->dev, "%s: binding to %s returning %d\n",