]> git.baikalelectronics.ru Git - kernel.git/commit
HID: wiimote: Cache wiimote led state
authorDavid Herrmann <dh.herrmann@googlemail.com>
Tue, 5 Jul 2011 11:45:18 +0000 (13:45 +0200)
committerJiri Kosina <jkosina@suse.cz>
Mon, 11 Jul 2011 12:30:24 +0000 (14:30 +0200)
commit274640d87bde338f5e05266ba8885dc402373457
tree901b90f2c9488d10359c71a64875bac862eb938d
parent67bb19879916d9702f7661bb4f20de47b79401f4
HID: wiimote: Cache wiimote led state

Save the current state of the leds in the wiimote data structure. This
allows us to discard new led requests that wouldn't change anything.
Protect the whole state structure by a spinlock. Every wiiproto_*
function expects this spinlock to be held when called.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-wiimote.c