]> git.baikalelectronics.ru Git - kernel.git/commit
HID: hid-lg4ff: Protect concurrent access to output HID report
authorMichal Malý <madcatxster@devoid-pointer.net>
Wed, 8 Apr 2015 20:56:48 +0000 (22:56 +0200)
committerJiri Kosina <jkosina@suse.cz>
Thu, 7 May 2015 14:27:16 +0000 (16:27 +0200)
commit16cdefe35e55116b49c1d09df06954a918de3305
tree5211b34bcc04c0460949ed3b72382213f582e6af
parentd3eef674bb7359d607b95c97334101f39831f369
HID: hid-lg4ff: Protect concurrent access to output HID report

Protect concurrent access to output HID report with a spinlock. The HID report
structure used to submit commands to wheels is shared amongst all functions that
need to do so and some of these functions can be executed in parallel.
Additionally, lg4ff_play() can be called from interrupt context by ff-memless
module. Locking is necessary to prevent sending bogus data to the wheels.

Signed-off-by: Michal Malý <madcatxster@devoid-pointer.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-lg4ff.c