summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/function/u_fs.h
diff options
context:
space:
mode:
authorRobert Baldyga <r.baldyga@samsung.com>2014-08-25 13:16:27 +0400
committerFelipe Balbi <balbi@ti.com>2014-09-03 18:15:59 +0400
commit6d5c1c77bbf98b2cc5373af02bb7b3b27584ee4a (patch)
tree7e1d8e417332a4a813b5c13814fc47e20896db18 /drivers/usb/gadget/function/u_fs.h
parent2743e7f90dc08282d027dbc2f6486f5cb85aa493 (diff)
downloadlinux-6d5c1c77bbf98b2cc5373af02bb7b3b27584ee4a.tar.xz
usb: gadget: f_fs: fix the redundant ep files problem
Up to now, when endpoint addresses in descriptors were non-consecutive, there were created redundant files, which could cause problems in kernel, when user tried to read/write to them. It was result of fact that maximum endpoint address was taken as total number of endpoints in function. This patch adds endpoint descriptors counting and storing their addresses in eps_addrmap to verify their cohesion in each speed. Endpoint address map would be also useful for further features, just like vitual endpoint address mapping. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/function/u_fs.h')
-rw-r--r--drivers/usb/gadget/function/u_fs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/gadget/function/u_fs.h b/drivers/usb/gadget/function/u_fs.h
index 63d6e71569c1..d48897e8ffeb 100644
--- a/drivers/usb/gadget/function/u_fs.h
+++ b/drivers/usb/gadget/function/u_fs.h
@@ -224,6 +224,8 @@ struct ffs_data {
void *ms_os_descs_ext_prop_name_avail;
void *ms_os_descs_ext_prop_data_avail;
+ u8 eps_addrmap[15];
+
unsigned short strings_count;
unsigned short interfaces_count;
unsigned short eps_count;