diff --git a/iscsi-scst/kernel/conn.c b/iscsi-scst/kernel/conn.c index 2acc83b66..3e14fe82c 100644 --- a/iscsi-scst/kernel/conn.c +++ b/iscsi-scst/kernel/conn.c @@ -599,14 +599,14 @@ out: #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20) static void conn_nop_in_delayed_work_fn(void *p) #else -static void conn_nop_in_delayed_work_fn(struct delayed_work *work) +static void conn_nop_in_delayed_work_fn(struct work_struct *work) #endif { #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20) struct iscsi_conn *conn = (struct iscsi_conn *)p; #else struct iscsi_conn *conn = container_of(work, struct iscsi_conn, - nop_in_delayed_work); + nop_in_delayed_work.work); #endif unsigned long next_timeout = 0; @@ -933,7 +933,7 @@ static int iscsi_conn_alloc(struct iscsi_session *session, conn->nop_in_ttt = 0; #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)) INIT_DELAYED_WORK(&conn->nop_in_delayed_work, - (void (*)(struct work_struct *))conn_nop_in_delayed_work_fn); + conn_nop_in_delayed_work_fn); #else INIT_WORK(&conn->nop_in_delayed_work, conn_nop_in_delayed_work_fn, conn); diff --git a/qla2x00t/qla2x00-target/qla2x00t.c b/qla2x00t/qla2x00-target/qla2x00t.c index 27e531ab2..6cfce73bd 100644 --- a/qla2x00t/qla2x00-target/qla2x00t.c +++ b/qla2x00t/qla2x00-target/qla2x00t.c @@ -1146,10 +1146,10 @@ static void q2t_undelete_sess(struct q2t_sess *sess) return; } -static void q2t_del_sess_work_fn(struct delayed_work *work) +static void q2t_del_sess_work_fn(struct work_struct *work) { struct q2t_tgt *tgt = container_of(work, struct q2t_tgt, - sess_del_work); + sess_del_work.work); scsi_qla_host_t *ha = tgt->ha; scsi_qla_host_t *pha = to_qla_parent(ha); struct q2t_sess *sess; @@ -5875,8 +5875,7 @@ static int q2t_add_target(scsi_qla_host_t *ha) init_waitqueue_head(&tgt->waitQ); INIT_LIST_HEAD(&tgt->sess_list); INIT_LIST_HEAD(&tgt->del_sess_list); - INIT_DELAYED_WORK(&tgt->sess_del_work, - (void (*)(struct work_struct *))q2t_del_sess_work_fn); + INIT_DELAYED_WORK(&tgt->sess_del_work, q2t_del_sess_work_fn); spin_lock_init(&tgt->sess_work_lock); INIT_WORK(&tgt->sess_work, q2t_sess_work_fn); INIT_LIST_HEAD(&tgt->sess_works_list); diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index c08f49afd..99f32c3d3 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -3167,14 +3167,14 @@ out: #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20) static void scst_hw_pending_work_fn(void *p) #else -static void scst_hw_pending_work_fn(struct delayed_work *work) +static void scst_hw_pending_work_fn(struct work_struct *work) #endif { #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20) struct scst_session *sess = (struct scst_session *)p; #else struct scst_session *sess = container_of(work, struct scst_session, - hw_pending_work); + hw_pending_work.work); #endif struct scst_tgt_template *tgtt = sess->tgt->tgtt; struct scst_cmd *cmd; @@ -5096,8 +5096,7 @@ struct scst_session *scst_alloc_session(struct scst_tgt *tgt, gfp_t gfp_mask, INIT_LIST_HEAD(&sess->init_deferred_cmd_list); INIT_LIST_HEAD(&sess->init_deferred_mcmd_list); #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)) - INIT_DELAYED_WORK(&sess->hw_pending_work, - (void (*)(struct work_struct *))scst_hw_pending_work_fn); + INIT_DELAYED_WORK(&sess->hw_pending_work, scst_hw_pending_work_fn); #else INIT_WORK(&sess->hw_pending_work, scst_hw_pending_work_fn, sess); #endif diff --git a/scst/src/scst_mem.c b/scst/src/scst_mem.c index 950fba1c1..6509e4897 100644 --- a/scst/src/scst_mem.c +++ b/scst/src/scst_mem.c @@ -424,7 +424,7 @@ static int sgv_shrink(struct shrinker *shrinker, struct shrink_control *sc) #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20) static void sgv_purge_work_fn(void *p) #else -static void sgv_purge_work_fn(struct delayed_work *work) +static void sgv_purge_work_fn(struct work_struct *work) #endif { unsigned long cur_time = jiffies; @@ -432,7 +432,7 @@ static void sgv_purge_work_fn(struct delayed_work *work) struct sgv_pool *pool = (struct sgv_pool *)p; #else struct sgv_pool *pool = container_of(work, struct sgv_pool, - sgv_purge_work); + sgv_purge_work.work); #endif TRACE_ENTRY(); @@ -1500,8 +1500,7 @@ static int sgv_pool_init(struct sgv_pool *pool, const char *name, INIT_LIST_HEAD(&pool->recycling_lists[i]); #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)) - INIT_DELAYED_WORK(&pool->sgv_purge_work, - (void (*)(struct work_struct *))sgv_purge_work_fn); + INIT_DELAYED_WORK(&pool->sgv_purge_work, sgv_purge_work_fn); #else INIT_WORK(&pool->sgv_purge_work, sgv_purge_work_fn, pool); #endif