scst_lib: Port task management debug code to kernel v4.15

This commit is contained in:
Bart Van Assche
2018-03-04 09:47:02 -08:00
parent eff28b6855
commit c58b8e71fc
2 changed files with 5 additions and 3 deletions

View File

@@ -708,7 +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(_function, 0, 0, 0)
struct timer_list _name = __TIMER_INITIALIZER( \
(void (*)(unsigned long))(_function), \
(unsigned long)&(_name), 0, 0)
#endif
/* <linux/types.h> */

View File

@@ -15479,7 +15479,7 @@ EXPORT_SYMBOL_GPL(scst_random);
#define INIT_TM_DBG_STATE TM_DBG_STATE_ABORT
static void tm_dbg_timer_fn(unsigned long arg);
static void tm_dbg_timer_fn(struct timer_list *timer);
static DEFINE_SPINLOCK(scst_tm_dbg_lock);
/* All serialized by scst_tm_dbg_lock */
@@ -15533,7 +15533,7 @@ static void tm_dbg_deinit_tgt_dev(struct scst_tgt_dev *tgt_dev)
return;
}
static void tm_dbg_timer_fn(unsigned long arg)
static void tm_dbg_timer_fn(struct timer_list *timer)
{
TRACE_MGMT_DBG("%s", "delayed cmd timer expired");
tm_dbg_flags.tm_dbg_release = 1;