HID: wiimote: lock DRM mode during debugfs overwrite
authorDavid Herrmann <dh.herrmann@gmail.com>
Sun, 5 May 2013 21:13:03 +0000 (23:13 +0200)
committerJiri Kosina <jkosina@suse.cz>
Mon, 3 Jun 2013 09:07:04 +0000 (11:07 +0200)
commitd76f89e13a0439649120a85297085e8d8fff77ec
tree2b4d434b7085dfba62a2dfb19cb50dc3d5f092e7
parent51103c70bf8d48395ff77eee387e6c94f0216630
HID: wiimote: lock DRM mode during debugfs overwrite

If we write a DRM mode via debugfs, we shouldn't allow normal operations
to overwrite this DRM mode. This is important if we want to debug
3rd-party devices and we want to see what data is sent on each mode.

If we write NULL/0 as DRM, the lock is removed again so the best matching
DRM is chosen by wiimote core.

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