--- dahdi-linux-complete-3.1.0+3.1.0/linux/include/dahdi/kernel.h 2019-10-03 21:48:09.000000000 +0700 +++ dahdi-linux-complete/linux/include/dahdi/kernel.h 2020-05-18 18:44:35.942817272 +0700 @@ -1388,23 +1397,27 @@ #define TIMER_DATA_TYPE struct timer_list * #endif #endif +#endif /* 4.13.0 */ #ifndef DAHDI_HAVE_TIMER_SETUP /** * timer_setup - Added in 4.13.0. We can make a direct translation to the * setup_timer interface since DAHDI does not pass any flags to any of the * timer_setup functions. + * Callback syntax changed in 4.15.0, but we use it's syntax in our "timer_setup". + * So, we have to provide our "timer_setup" till 4.15.0 . * */ static inline void -timer_setup(struct timer_list *timer, +fake_timer_setup(struct timer_list *timer, void (*timer_callback)(TIMER_DATA_TYPE data), unsigned long flags) { WARN_ON(flags != 0); setup_timer(timer, timer_callback, (TIMER_DATA_TYPE)timer); } - +#define timer_setup fake_timer_setup +#undef from_timer #define from_timer(var, callback_timer, timer_fieldname) \ container_of((struct timer_list *)(callback_timer), \ typeof(*var), timer_fieldname) @@ -1482,7 +1495,6 @@ #endif /* 4.0.0 */ #endif /* 4.10.0 */ #endif /* 4.11.0 */ -#endif /* 4.13.0 */ #else /* >= 4.15.0 */ #ifndef TIMER_DATA_TYPE