aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2009-10-20 18:03:38 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-12-11 14:55:15 -0500
commit5242658d1b97771d658991cf29be32bcf81d5859 (patch)
treea2f5b2afd848619915aa8e1f3cfeb3c94289b20b /include
parent4de84057598599bbf90bf1deae923bc33f571475 (diff)
USB gadget: Handle endpoint requests at the function level
Control requests targeted at an endpoint (that is sent to EP0 but specifying the target endpoint address in wIndex) are dispatched to the current configuration's setup callback, requiring all gadget drivers to dispatch the requests to the correct function driver. To avoid this, record which endpoints are used by each function in the composite driver SET CONFIGURATION handler and dispatch requests targeted at endpoints to the correct function. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/usb/composite.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h
index 4f6bb3d2160e..738ea1a691cb 100644
--- a/include/linux/usb/composite.h
+++ b/include/linux/usb/composite.h
@@ -127,6 +127,7 @@ struct usb_function {
127 /* private: */ 127 /* private: */
128 /* internals */ 128 /* internals */
129 struct list_head list; 129 struct list_head list;
130 DECLARE_BITMAP(endpoints, 32);
130}; 131};
131 132
132int usb_add_function(struct usb_configuration *, struct usb_function *); 133int usb_add_function(struct usb_configuration *, struct usb_function *);