HSI: cmt_speech: use timespec64 instead of timespec
authorArnd Bergmann <[email protected]>
Mon, 27 Nov 2017 11:42:34 +0000 (12:42 +0100)
committerSebastian Reichel <[email protected]>
Fri, 1 Dec 2017 15:31:47 +0000 (16:31 +0100)
struct timespec should no longer be used because of the y2038
overflow problem. This code does not suffer from the overflow,
but it's trivial to change it to use timespec64 without changing
the interface, so let's do that.

Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
drivers/hsi/clients/cmt_speech.c

index 727f968ac1cbb9ea4994e313d7cc7cb5ede432b3..05b80723d39dd831d8796231fb29db605c33b033 100644 (file)
@@ -451,11 +451,11 @@ static void cs_hsi_read_on_control_complete(struct hsi_msg *msg)
        dev_dbg(&hi->cl->device, "Read on control: %08X\n", cmd);
        cs_release_cmd(msg);
        if (hi->flags & CS_FEAT_TSTAMP_RX_CTRL) {
-               struct timespec tspec;
+               struct timespec64 tspec;
                struct cs_timestamp *tstamp =
                        &hi->mmap_cfg->tstamp_rx_ctrl;
 
-               ktime_get_ts(&tspec);
+               ktime_get_ts64(&tspec);
 
                tstamp->tv_sec = (__u32) tspec.tv_sec;
                tstamp->tv_nsec = (__u32) tspec.tv_nsec;