From 0aa737328bcf0b69aa603fe33a239b2cbf3c6797 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Fri, 6 Feb 2004 15:17:59 +1100 Subject: [PATCH] ppc32: Fix the mac mouse button emulation code Move the call to mac_hid_mouse_emulate_buttongs to the right function so it works again in console mode --- drivers/char/keyboard.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/char/keyboard.c b/drivers/char/keyboard.c index dc03b1a999566..643014bf8c4c1 100644 --- a/drivers/char/keyboard.c +++ b/drivers/char/keyboard.c @@ -972,11 +972,6 @@ extern void sun_do_break(void); static int emulate_raw(struct vc_data *vc, unsigned int keycode, unsigned char up_flag) { -#ifdef CONFIG_MAC_EMUMOUSEBTN - if (mac_hid_mouse_emulate_buttons(1, keycode, !up_flag)) - return 0; -#endif /* CONFIG_MAC_EMUMOUSEBTN */ - if (keycode > 255 || !x86_keycodes[keycode]) return -1; @@ -1055,6 +1050,11 @@ void kbd_keycode(unsigned int keycode, int down, struct pt_regs *regs) rep = (down == 2); +#ifdef CONFIG_MAC_EMUMOUSEBTN + if (mac_hid_mouse_emulate_buttons(1, keycode, down)) + return; +#endif /* CONFIG_MAC_EMUMOUSEBTN */ + if ((raw_mode = (kbd->kbdmode == VC_RAW))) if (emulate_raw(vc, keycode, !down << 7)) if (keycode < BTN_MISC) -- 2.53.0