Skip to content

Commit f930a7a

Browse files
hjl-toolsH. Peter Anvin
authored andcommitted
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>
1 parent 9dd4cca commit f930a7a

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎drivers/input/input-compat.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
int input_event_from_user(const char __user *buffer,
1818
struct input_event *event)
1919
{
20-
if (INPUT_COMPAT_TEST) {
20+
if (INPUT_COMPAT_TEST && !COMPAT_USE_64BIT_TIME) {
2121
struct input_event_compat compat_event;
2222

2323
if (copy_from_user(&compat_event, buffer,
@@ -41,7 +41,7 @@ int input_event_from_user(const char __user *buffer,
4141
int input_event_to_user(char __user *buffer,
4242
const struct input_event *event)
4343
{
44-
if (INPUT_COMPAT_TEST) {
44+
if (INPUT_COMPAT_TEST && !COMPAT_USE_64BIT_TIME) {
4545
struct input_event_compat compat_event;
4646

4747
compat_event.time.tv_sec = event->time.tv_sec;

‎drivers/input/input-compat.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ struct ff_effect_compat {
6767

6868
static inline size_t input_event_size(void)
6969
{
70-
return INPUT_COMPAT_TEST ?
70+
return (INPUT_COMPAT_TEST && !COMPAT_USE_64BIT_TIME) ?
7171
sizeof(struct input_event_compat) : sizeof(struct input_event);
7272
}
7373

0 commit comments

Comments
 (0)