diff options
author | Arnd Bergmann | 2015-11-25 16:12:53 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab | 2015-12-03 19:19:36 +0100 |
commit | f07c73fea2187997552020c3d2db4f0b0302931c (patch) | |
tree | 20e783b8f88e2dfdf6dc130ebb41daec698d46c2 /MAINTAINERS | |
parent | [media] staging: media: lirc: Replace timeval with ktime_t in lirc_serial.c (diff) | |
download | kernel-qcow2-linux-f07c73fea2187997552020c3d2db4f0b0302931c.tar.gz kernel-qcow2-linux-f07c73fea2187997552020c3d2db4f0b0302931c.tar.xz kernel-qcow2-linux-f07c73fea2187997552020c3d2db4f0b0302931c.zip |
[media] staging: media: lirc: Replace timeval with ktime_t in lirc_sasem.c
'struct timeval presstime' and 'struct timeval tv' is used to
calculate the time since the last button press.
32-bit systems using 'struct timeval' will break in the year 2038,
so we have to replace that code with more appropriate types.
This patch changes the media: lirc driver to use ktime_t.
ktime_get() is better than using do_gettimeofday(), because it uses
the monotonic clock. ktime_sub() are used to subtract two ktime
variables. 'ms' is only used to check how much time has passed by comparing
to 250. So instead of using expensive ktime_to_ms() call, it has been
changed to hold nanoseconds by using ktime_to_ns().
Build tested it. Tested with sparse too.
Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'MAINTAINERS')
0 files changed, 0 insertions, 0 deletions