Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit e6515203 authored by Amitoj Kaur Chawla's avatar Amitoj Kaur Chawla Committed by David S. Miller
Browse files

net: hamradio: baycom_ser_fdx: Replace timeval with timespec64



32 bit systems using 'struct timeval' will break in the year 2038, so
we replace the code appropriately. However, this driver is not broken
in 2038 since we are only using microseconds portion of the time.

This patch replaces 'struct timeval' with 'struct timespec64'. We only
need to find elapsed microseconds rather than absolute time, so it's
better to use monotonic time, so using ktime_get_ts64() makes the code
more efficient and more robust against concurrent settimeofday()
calls.

Signed-off-by: default avatarAmitoj Kaur Chawla <amitoj1606@gmail.com>
Reviewed-by: default avatarArnd Bergmann <arnd@arndb.de>
Reviewed-by: default avatarThomas Sailer <t.sailer@alumni.ethz.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4a92602a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment