]> git.baikalelectronics.ru Git - kernel.git/commit
Input: tsc2005 - fix locking issue
authorAaro Koskinen <aaro.koskinen@nokia.com>
Thu, 24 Mar 2011 06:48:19 +0000 (23:48 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 24 Mar 2011 06:50:36 +0000 (23:50 -0700)
commitdb89245acaa421da42d22f880815d92565d4a13e
tree48afd4cf19e8b552e9f0a2c68eea87e4b662a680
parent257978a55c29a01cc2e9b8ef8e624e50dace6bae
Input: tsc2005 - fix locking issue

Commit 3ef5d90 (Input: tsc2005 - add open/close) introduced a
locking issue with the ESD watchdog: __tsc2005_disable() is calling
cancel_delayed_work_sync() with mutex held, and the work also needs the
same mutex.

Fix the problem by using mutex_trylock() in tsc2005_esd_work(). If the
mutex is taken, we know we are in the middle of disable or enable and
the watchdog check can be skipped.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/touchscreen/tsc2005.c