diff options
author | Arnd Bergmann <arnd@arndb.de> | 2015-11-25 13:12:53 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-12-03 16:19:36 -0200 |
commit | f07c73fea2187997552020c3d2db4f0b0302931c (patch) | |
tree | 20e783b8f88e2dfdf6dc130ebb41daec698d46c2 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 8459503295d9ed3aaf5a2089a2fbdbdb5e9a9576 (diff) |
[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 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions