ANDROID: hid: uhid: implement refcount for open and close
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 30 May 2017 21:46:26 +0000 (14:46 -0700)
committerAmit Pundir <amit.pundir@linaro.org>
Wed, 21 Jun 2017 11:04:04 +0000 (16:34 +0530)
commit76dac329519c70c14330464a23f984ff484b9d7f
tree755df22d850d1462a3e5faed388b79d517852b69
parente7cb7e5af7ac0d3f46a8121f8ce73b05811c1990
ANDROID: hid: uhid: implement refcount for open and close

Fix concurrent open and close activity sending a UHID_CLOSE while
some consumers still have the device open.

Temporary solution for reference counts on device open and close
calls, absent a facility for this in the HID core likely to appear
in the future.

[toddpoynor@google.com: commit text]
Bug: 38448648
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Change-Id: I57413e42ec961a960a8ddc4942228df22c730d80
drivers/hid/uhid.c