Skip to content

Commit

Permalink
riscv: input: Fixup input_event
Browse files Browse the repository at this point in the history
RISC-V treat input_event as 24 Bytes in userspace, so adjust the
time value data type to match the requirement.

Signed-off-by: Guo Ren <[email protected]>
Signed-off-by: Guo Ren <[email protected]>
  • Loading branch information
guoren83 authored and RevySR committed Jul 31, 2024
1 parent f0a0526 commit 19aaa09
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/uapi/linux/input.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ struct input_event {
struct timeval time;
#define input_event_sec time.tv_sec
#define input_event_usec time.tv_usec
#else
#if defined(__riscv)
__kernel_time64_t __sec;
__kernel_time64_t __usec;
#else
__kernel_ulong_t __sec;
#if defined(__sparc__) && defined(__arch64__)
Expand All @@ -38,6 +42,7 @@ struct input_event {
#else
__kernel_ulong_t __usec;
#endif
#endif
#define input_event_sec __sec
#define input_event_usec __usec
#endif
Expand Down

0 comments on commit 19aaa09

Please sign in to comment.