Skip to content
Commit aa4f3c66 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Marc Kleine-Budde
Browse files

can: peak_usb: use ktime_t consistently



This changes the calculation of the timestamps to use ktime_t
instead of struct timeval as the base. This gets rid of one
of the few remaining users of the deprecated ktime_to_timeval()
and timeval_to_ktime() helpers.

The code should also get more efficient, as we have now removed
all of the divisions.

I have left the cut-off for resetting the counters as 4.200
seconds, in order to leave the behavior unchanged otherwise.

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent d5888a1e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment