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)
commitf286d487e9283a42a8844659bb5552b3f1bf6a7d
tree5b33ffcc7fe3e560b4f7faa2b001f46c2fc4436f
parent903124fe1aa284f61745a9dd4fbfa0184e569fff
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