]> git.baikalelectronics.ru Git - kernel.git/commit
usb: gadget: f_fs: fix the redundant ep files problem
authorRobert Baldyga <r.baldyga@samsung.com>
Mon, 25 Aug 2014 09:16:27 +0000 (11:16 +0200)
committerFelipe Balbi <balbi@ti.com>
Wed, 3 Sep 2014 14:15:59 +0000 (09:15 -0500)
commit48ac5423e672c5a16ab8bd80081c8109bab8f23a
tree7e1d8e417332a4a813b5c13814fc47e20896db18
parent1281ba299a61e00ebdc4db78ec9a05694ee692a2
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>
drivers/usb/gadget/function/f_fs.c
drivers/usb/gadget/function/u_fs.h