Commit d2ad91a9 authored by Mathis MARION's avatar Mathis MARION Committed by Federico Vaga

Kernel 5.11 compatibility for get_seconds

`get_seconds` disappeared in kernel 5.11 and onwards,
it is now required to call `ktime_get_real_seconds`.
Signed-off-by: 's avatarGwenhael GOAVEC <gwenhael.goavec@femto-st.fr>
Signed-off-by: 's avatarMathis MARION <mathis.marion@grenoble-inp.org>
parent ca26f914
......@@ -507,7 +507,11 @@ static void fa_init_timetag(struct fa_dev *fa)
{
unsigned long seconds;
#if KERNEL_VERSION(5, 11, 0) <= LINUX_VERSION_CODE
seconds = ktime_get_real_seconds();
#else
seconds = get_seconds();
#endif
fa_writel(fa, fa->fa_utc_base, &zfad_regs[ZFA_UTC_SECONDS_U],
(seconds >> 32) & 0xFFFFFFFF);
fa_writel(fa, fa->fa_utc_base, &zfad_regs[ZFA_UTC_SECONDS_L],
......
Markdown is supported
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