aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2010-01-30 03:53:29 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2010-01-30 04:47:49 -0500
commit99b089c3c38a83ebaeb1cc4584ddcde841626467 (patch)
tree484a9ac4871a055873b6427d2f7c3c37554fd0ce /drivers/char
parentef7995f4e46b1677f3eaaf547316e1a910b38dcb (diff)
Input: Mac button emulation - implement as an input filter
Current implementation of Mac mouse button emulation plugs into legacy keyboard driver, converts certain keys into button events on a separate device, and suppresses the real events from reaching tty. This worked well enough until user space started using evdev which was completely unaware of this arrangement and kept sending original key presses to its users. Change the implementation to use newly added input filter framework so that original key presses are not transmitted to any handlers. As a bonus remove SYSCTL dependencies from the code and use Kconfig instead; also do not create the emulated mouse device until user activates emulation. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/keyboard.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/char/keyboard.c b/drivers/char/keyboard.c
index f706b1dffdb3..cbf64b985ef4 100644
--- a/drivers/char/keyboard.c
+++ b/drivers/char/keyboard.c
@@ -1185,11 +1185,6 @@ static void kbd_keycode(unsigned int keycode, int down, int hw_raw)
1185 1185
1186 rep = (down == 2); 1186 rep = (down == 2);
1187 1187
1188#ifdef CONFIG_MAC_EMUMOUSEBTN
1189 if (mac_hid_mouse_emulate_buttons(1, keycode, down))
1190 return;
1191#endif /* CONFIG_MAC_EMUMOUSEBTN */
1192
1193 if ((raw_mode = (kbd->kbdmode == VC_RAW)) && !hw_raw) 1188 if ((raw_mode = (kbd->kbdmode == VC_RAW)) && !hw_raw)
1194 if (emulate_raw(vc, keycode, !down << 7)) 1189 if (emulate_raw(vc, keycode, !down << 7))
1195 if (keycode < BTN_MISC && printk_ratelimit()) 1190 if (keycode < BTN_MISC && printk_ratelimit())