From cb89ebef6a2c676fb44e2fd4cd71bba901e7c0d8 Mon Sep 17 00:00:00 2001 From: Dechen Chai Date: Thu, 24 Jun 2021 17:17:21 +0530 Subject: [PATCH] dsp: update avtimer for kernel 5.4 update timespec to timespec64 in avtimer. Change-Id: I63ada80df880ea670791592cc79804e930f9d311 Signed-off-by: Dechen Chai --- dsp/avtimer.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dsp/avtimer.c b/dsp/avtimer.c index 5655a0b9bd69..2a6ea047418a 100644 --- a/dsp/avtimer.c +++ b/dsp/avtimer.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2012-2015, 2017-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2015, 2017-2021 The Linux Foundation. All rights reserved. */ #include @@ -334,7 +334,7 @@ int avcs_core_query_timer_offset(int64_t *av_offset, int32_t clock_id) { uint32_t avtimer_msw = 0, avtimer_lsw = 0; uint64_t avtimer_tick_temp, avtimer_tick, sys_time = 0; - struct timespec ts; + struct timespec64 ts; if (!atomic_read(&avtimer.adsp_ready)) { pr_debug("%s:In SSR, return\n", __func__); @@ -346,22 +346,22 @@ int avcs_core_query_timer_offset(int64_t *av_offset, int32_t clock_id) return -EINVAL; } - memset(&ts, 0, sizeof(struct timespec)); + memset(&ts, 0, sizeof(struct timespec64)); avtimer_lsw = ioread32(avtimer.p_avtimer_lsw); avtimer_msw = ioread32(avtimer.p_avtimer_msw); switch (clock_id) { case CLOCK_MONOTONIC_RAW: - getrawmonotonic(&ts); + ktime_get_raw_ts64(&ts); break; case CLOCK_BOOTTIME: - get_monotonic_boottime(&ts); + ktime_get_boottime_ts64(&ts); break; case CLOCK_MONOTONIC: - ktime_get_ts(&ts); + ktime_get_ts64(&ts); break; case CLOCK_REALTIME: - ktime_get_real_ts(&ts); + ktime_get_real_ts64(&ts); break; default: pr_debug("%s: unsupported clock id %d\n", __func__, clock_id);