aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/can/usb/peak_usb/pcan_usb_core.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-11-03 17:31:37 +0100
committerMarc Kleine-Budde <mkl@pengutronix.de>2017-12-01 09:14:22 +0100
commitaa4f3c660a24bfdcc8f03f21f6e7be714b16b8e8 (patch)
tree0aaccd400de897b80efc7789fb17cd2f5fe46516 /drivers/net/can/usb/peak_usb/pcan_usb_core.h
parentcan: peak_usb: remove some 'struct timeval' users (diff)
downloadlinux-dev-aa4f3c660a24bfdcc8f03f21f6e7be714b16b8e8.tar.xz
linux-dev-aa4f3c660a24bfdcc8f03f21f6e7be714b16b8e8.zip
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: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/usb/peak_usb/pcan_usb_core.h')
-rw-r--r--drivers/net/can/usb/peak_usb/pcan_usb_core.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_core.h b/drivers/net/can/usb/peak_usb/pcan_usb_core.h
index b9a221ea7e5c..29f03dccca10 100644
--- a/drivers/net/can/usb/peak_usb/pcan_usb_core.h
+++ b/drivers/net/can/usb/peak_usb/pcan_usb_core.h
@@ -96,7 +96,7 @@ extern const struct peak_usb_adapter pcan_usb_pro_fd;
extern const struct peak_usb_adapter pcan_usb_x6;
struct peak_time_ref {
- struct timeval tv_host_0, tv_host;
+ ktime_t tv_host_0, tv_host;
u32 ts_dev_1, ts_dev_2;
u64 ts_total;
u32 tick_count;