Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

compat: Use COMPAT_USE_64BIT_TIME in the input subsystem

Enable the input system to be used with a compat ABI with 64-bit time.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

H. J. Lu and committed by
H. Peter Anvin
f930a7a0 9dd4ccaa

+3 -3
+2 -2
drivers/input/input-compat.c
··· 17 17 int input_event_from_user(const char __user *buffer, 18 18 struct input_event *event) 19 19 { 20 - if (INPUT_COMPAT_TEST) { 20 + if (INPUT_COMPAT_TEST && !COMPAT_USE_64BIT_TIME) { 21 21 struct input_event_compat compat_event; 22 22 23 23 if (copy_from_user(&compat_event, buffer, ··· 41 41 int input_event_to_user(char __user *buffer, 42 42 const struct input_event *event) 43 43 { 44 - if (INPUT_COMPAT_TEST) { 44 + if (INPUT_COMPAT_TEST && !COMPAT_USE_64BIT_TIME) { 45 45 struct input_event_compat compat_event; 46 46 47 47 compat_event.time.tv_sec = event->time.tv_sec;
+1 -1
drivers/input/input-compat.h
··· 67 67 68 68 static inline size_t input_event_size(void) 69 69 { 70 - return INPUT_COMPAT_TEST ? 70 + return (INPUT_COMPAT_TEST && !COMPAT_USE_64BIT_TIME) ? 71 71 sizeof(struct input_event_compat) : sizeof(struct input_event); 72 72 } 73 73