scst/include/backport.h: Rework the DEFINE_TIMER() backport such that it also works with kernel 3.6 and before

This commit is contained in:
Bart Van Assche
2018-03-06 22:24:21 -08:00
parent aab0b219a6
commit ea885e85cf

View File

@@ -708,9 +708,9 @@ struct t10_pi_tuple {
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
#undef DEFINE_TIMER
#define DEFINE_TIMER(_name, _function) \
struct timer_list _name = __TIMER_INITIALIZER( \
(void (*)(unsigned long))(_function), \
(unsigned long)&(_name), 0, 0)
struct timer_list _name = TIMER_INITIALIZER( \
(void (*)(unsigned long))(_function), 0, \
(unsigned long)&(_name))
#endif
/* <linux/types.h> */