]> git.hungrycats.org Git - linux/commitdiff
ppc32: Fix the mac mouse button emulation code
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 6 Feb 2004 04:17:59 +0000 (15:17 +1100)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 6 Feb 2004 04:17:59 +0000 (15:17 +1100)
Move the call to mac_hid_mouse_emulate_buttongs to the
right function so it works again in console mode

drivers/char/keyboard.c

index dc03b1a99956696d6381686209d29b6848f0a8b1..643014bf8c4c1d0b66f504c320ded8ad7ccab717 100644 (file)
@@ -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)