diff options
author | Arnd Bergmann <arnd@arndb.de> | 2015-11-25 13:11:55 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-12-03 16:17:57 -0200 |
commit | 8459503295d9ed3aaf5a2089a2fbdbdb5e9a9576 (patch) | |
tree | 4d307898eedb66a025c607542c4471dffee2ecfc /tools/perf/scripts/python/call-graph-from-postgresql.py | |
parent | 21312f6ddb1710750761c4b140b7367208b4f89e (diff) |
[media] staging: media: lirc: Replace timeval with ktime_t in lirc_serial.c
'struct timeval tv' is used to get current time.
'static struct timeval lasttv' is used to get last interrupt time.
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 lirc_serial.c file of media: lirc to use
ktime_t.
ktime_get() is better than using do_gettimeofday(),
because it uses the monotonic clock. ktime_sub is used
to subtract two ktime variables. The check to test time
going backwards is also removed. Intialization to static
variable is also removed. ktime_to_us() is used to convert
ktime_t to microsecond value. deltv is changed to delkt, a
ktime_t type varibale from long to assign the ktime_sub value
directly. ktime_compare is used to compare delkt with 15
seconds, which is changed to a nanosecond value by using
ktime_set().
Build tested it.
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/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions