From: Ralf Baechle <ralf@linux-mips.org>

Extend the compat mode kludgeology in envdev to cover MIPS as well.

Or why we should need something like is_compat_task() ...

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Vojtech Pavlik <vojtech@suse.cz>
Cc: Dmitry Torokhov <dtor_core@ameritech.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 drivers/input/evdev.c |    2 ++
 1 files changed, 2 insertions(+)

diff -puN drivers/input/evdev.c~mips-kludge-envdev-to-build-for-64-bit-mips-with-32-bit-compat drivers/input/evdev.c
--- 25/drivers/input/evdev.c~mips-kludge-envdev-to-build-for-64-bit-mips-with-32-bit-compat	Wed Aug 31 12:44:38 2005
+++ 25-akpm/drivers/input/evdev.c	Wed Aug 31 12:44:38 2005
@@ -160,6 +160,8 @@ struct input_event_compat {
 #  define COMPAT_TEST IS_IA32_PROCESS(ia64_task_regs(current))
 #elif defined(CONFIG_ARCH_S390)
 #  define COMPAT_TEST test_thread_flag(TIF_31BIT)
+#elif defined(CONFIG_MIPS)
+#  define COMPAT_TEST (current->thread.mflags & MF_32BIT_ADDR)
 #else
 #  define COMPAT_TEST test_thread_flag(TIF_32BIT)
 #endif
_