aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb/gadget.h
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2012-09-06 14:11:11 -0400
committerFelipe Balbi <balbi@ti.com>2012-09-10 08:37:08 -0400
commite87bb7118c4f752de4616a7ab56c51ed3e7f6f53 (patch)
treea21a44d5b7a703cad5595621ced7a24a289c87dc /include/linux/usb/gadget.h
parent0ba16dea72a457bf65fc06ef60165c994e2f7420 (diff)
usb: gadget: move global vars from epautoconf into struct usb_gadget
epautoconf has two global variables which count the endpoint number of last assigned endpoint. This patch removes the global variable and keeps it as per (UDC) gadget. While here, the ifdef is removed and now the in and outpoint are enumerated unconditionally. The dwc3 for instance supports 32 endpoints in total. 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.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index 822c1b88f95a..5b6e50888248 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -503,6 +503,8 @@ struct usb_gadget_ops {
503 * @name: Identifies the controller hardware type. Used in diagnostics 503 * @name: Identifies the controller hardware type. Used in diagnostics
504 * and sometimes configuration. 504 * and sometimes configuration.
505 * @dev: Driver model state for this abstract device. 505 * @dev: Driver model state for this abstract device.
506 * @out_epnum: last used out ep number
507 * @in_epnum: last used in ep number
506 * 508 *
507 * Gadgets have a mostly-portable "gadget driver" implementing device 509 * Gadgets have a mostly-portable "gadget driver" implementing device
508 * functions, handling all usb configurations and interfaces. Gadget 510 * functions, handling all usb configurations and interfaces. Gadget
@@ -537,6 +539,8 @@ struct usb_gadget {
537 unsigned a_alt_hnp_support:1; 539 unsigned a_alt_hnp_support:1;
538 const char *name; 540 const char *name;
539 struct device dev; 541 struct device dev;
542 unsigned out_epnum;
543 unsigned in_epnum;
540}; 544};
541 545
542static inline void set_gadget_data(struct usb_gadget *gadget, void *data) 546static inline void set_gadget_data(struct usb_gadget *gadget, void *data)