Closed smunaut closed 5 years ago
Hi, Sylvain, I assume you've tested the code to make sure it works?
hi, @smunaut, since the change of struct timer_list
in linux/timer.h
started from 4.15 [1], I would like to suggest :
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))
to mitigate the transition between old and new kernels.
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))
// code for kernel after and include 14.15
#else
// code for kernel before 4.15
#endif
[1]: The data
field inside struct timer_list
was removed from kernel 14.5-rc1 :
https://elixir.bootlin.com/linux/v4.15-rc1/source/include/linux/timer.h
@chemeris Well, to be honest I'm not entirely sure what that timer is for :/ But what I know is that I captured samples with the driver as I submitted and I can also use minicom to talk to the GPS.
@brchiu it doesn't matter when the field was removed is irrelevant, it's when the new API was added that is. And that was added in 4.14. And I hate plastering #ifdef all over ...
The problem is resolved by removing the timer entirely
This allows to build with the newer timer API which has been in the kernel for a while. And so this re-enabled the disabled uart_timer code.
Patch both in attachement and inline.
xtrx-fix-timer-api.txt