]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/input/input-compat.h
Merge branch 'drm-next-4.6' of git://people.freedesktop.org/~agd5f/linux into drm...
[karo-tx-linux.git] / drivers / input / input-compat.h
index 148f66fe3205c7a3059a26a5f9e4748dd4c4bb50..1563160a7af3c09912e3bc4a0fa8b6eaa24f3cfd 100644 (file)
 
 #ifdef CONFIG_COMPAT
 
-/* Note to the author of this code: did it ever occur to
-   you why the ifdefs are needed? Think about it again. -AK */
-#if defined(CONFIG_X86_64) || defined(CONFIG_TILE)
-#  define INPUT_COMPAT_TEST is_compat_task()
-#elif defined(CONFIG_S390)
-#  define INPUT_COMPAT_TEST test_thread_flag(TIF_31BIT)
-#elif defined(CONFIG_MIPS)
-#  define INPUT_COMPAT_TEST test_thread_flag(TIF_32BIT_ADDR)
-#else
-#  define INPUT_COMPAT_TEST test_thread_flag(TIF_32BIT)
-#endif
-
 struct input_event_compat {
        struct compat_timeval time;
        __u16 type;
@@ -67,7 +55,7 @@ struct ff_effect_compat {
 
 static inline size_t input_event_size(void)
 {
-       return (INPUT_COMPAT_TEST && !COMPAT_USE_64BIT_TIME) ?
+       return (in_compat_syscall() && !COMPAT_USE_64BIT_TIME) ?
                sizeof(struct input_event_compat) : sizeof(struct input_event);
 }