On Sat, Oct 24, 2015 at 11:49:42PM +0530, Amitoj Kaur Chawla wrote:
This driver uses 'struct timeval' which we are trying to remove since 32 bit time types will break in the year 2038 by replacing it with ktime_t.
This patch changes do_gettimeofday() to ktime_get() because ktime_get() returns ktime_t while do_gettimeofday() returns struct timeval.
This patch also uses ktime_ms_delta() to get the elapsed time in milliseconds.
Signed-off-by: Amitoj Kaur Chawla amitoj1606@gmail.com
drivers/staging/media/lirc/lirc_sasem.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-)
<snip>
@@ -584,10 +585,9 @@ static void incoming_packet(struct sasem_context *context, */ /* get the time since the last button press */
- do_gettimeofday(&tv);
- ms = (tv.tv_sec - context->presstime.tv_sec) * 1000 +
(tv.tv_usec - context->presstime.tv_usec) / 1000;
- timestamp = ktime_get();
- ms = ktime_ms_delta(timestamp, context->presstime);
Trailing whitespace.
regards sudip