]> git.baikalelectronics.ru Git - kernel.git/commit
usb: gadget: hid: Fix static variable usage
authorKrzysztof Opasiak <kopasiak90@gmail.com>
Fri, 27 Mar 2015 08:35:44 +0000 (09:35 +0100)
committerFelipe Balbi <balbi@ti.com>
Mon, 27 Apr 2015 19:44:23 +0000 (14:44 -0500)
commit1c7802878c4f61af593eb981a4460c58e6bd2d25
tree5b33ffcc7fe3e560b4f7faa2b001f46c2fc4436f
parentf2b6d4b6c14a66968f082fd173c83e8b206dbbca
usb: gadget: hid: Fix static variable usage

If we have multiple instances of hid function, each of
them may have different report descriptor, also their
length may be different.

Currently we are using static hidg_desc varable which
is being filled in hidg_bind(). Then we send its content
to host in hidg_setup() function. This content may
have been already overwriten if another instance
has executed hidg_bind().

Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/function/f_hid.c