aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb/gadget.h
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 /include/linux/usb/gadget.h
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 'include/linux/usb/gadget.h')
-rw-r--r--include/linux/usb/gadget.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index 9eb4e712168f..822c1b88f95a 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -474,7 +474,8 @@ struct usb_gadget_ops {
474 474
475 /* Those two are deprecated */ 475 /* Those two are deprecated */
476 int (*start)(struct usb_gadget_driver *, 476 int (*start)(struct usb_gadget_driver *,
477 int (*bind)(struct usb_gadget *)); 477 int (*bind)(struct usb_gadget *,
478 struct usb_gadget_driver *driver));
478 int (*stop)(struct usb_gadget_driver *); 479 int (*stop)(struct usb_gadget_driver *);
479}; 480};
480 481
@@ -821,7 +822,8 @@ static inline int usb_gadget_disconnect(struct usb_gadget *gadget)
821struct usb_gadget_driver { 822struct usb_gadget_driver {
822 char *function; 823 char *function;
823 enum usb_device_speed max_speed; 824 enum usb_device_speed max_speed;
824 int (*bind)(struct usb_gadget *gadget); 825 int (*bind)(struct usb_gadget *gadget,
826 struct usb_gadget_driver *driver);
825 void (*unbind)(struct usb_gadget *); 827 void (*unbind)(struct usb_gadget *);
826 int (*setup)(struct usb_gadget *, 828 int (*setup)(struct usb_gadget *,
827 const struct usb_ctrlrequest *); 829 const struct usb_ctrlrequest *);