diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-11-07 00:39:07 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-11-11 00:13:32 -0500 |
commit | bf3204cbff7d2606e758afb0994e8da6ae1c6c26 (patch) | |
tree | 01951b829d2af6a52b82bec35cc05261dcf77fe2 /include | |
parent | 558a5e296a02266ef43d6e933ee35df9976de987 (diff) |
Input: fix locking in memoryless force-feedback devices
Now that input core acquires dev->event_lock spinlock and disables
interrupts when propagating input events, using spin_lock_bh() in
ff-memless driver is not allowed. Actually, the timer_lock itself
is not needed anymore, we should simply use dev->event_lock
as well.
Also do a small cleanup in force-feedback core.
Reported-by: kerneloops.org
Reported-by: http://www.kerneloops.org/searchweek.php?search=ml_ff_set_gain
Reported-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/input.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/input.h b/include/linux/input.h index 0ccfc30cd40f..c2b1a7d244d9 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -1377,6 +1377,10 @@ extern struct class input_class; | |||
1377 | * methods; erase() is optional. set_gain() and set_autocenter() need | 1377 | * methods; erase() is optional. set_gain() and set_autocenter() need |
1378 | * only be implemented if driver sets up FF_GAIN and FF_AUTOCENTER | 1378 | * only be implemented if driver sets up FF_GAIN and FF_AUTOCENTER |
1379 | * bits. | 1379 | * bits. |
1380 | * | ||
1381 | * Note that playback(), set_gain() and set_autocenter() are called with | ||
1382 | * dev->event_lock spinlock held and interrupts off and thus may not | ||
1383 | * sleep. | ||
1380 | */ | 1384 | */ |
1381 | struct ff_device { | 1385 | struct ff_device { |
1382 | int (*upload)(struct input_dev *dev, struct ff_effect *effect, | 1386 | int (*upload)(struct input_dev *dev, struct ff_effect *effect, |