]> git.baikalelectronics.ru Git - kernel.git/commit
Input: mousedev - fix race when creating mixed device
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 6 Mar 2014 20:57:24 +0000 (12:57 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 29 Mar 2014 21:44:23 +0000 (14:44 -0700)
commite8f920fab640b3ad4d3569a6671e036bf4fca26a
tree79330a0e67bdea49030b68173ca016b9ce424a3c
parent088b027d520e511fa315f428627a2d1f4d31594c
Input: mousedev - fix race when creating mixed device

We should not be using static variable mousedev_mix in methods that can be
called before that singleton gets assigned. While at it let's add open and
close methods to mousedev structure so that we do not need to test if we
are dealing with multiplexor or normal device and simply call appropriate
method directly.

This fixes: https://bugzilla.kernel.org/show_bug.cgi?id=71551

Reported-by: GiulioDP <depasquale.giulio@gmail.com>
Tested-by: GiulioDP <depasquale.giulio@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/mousedev.c