@@ -269,10 +269,9 @@ qla2x00_rel_sp(srb_t *sp)
static inline void
qla2x00_init_timer(srb_t *sp, unsigned long tmo)
{
- init_timer(&sp->u.iocb_cmd.timer);
+ setup_timer(&sp->u.iocb_cmd.timer, qla2x00_sp_timeout,
+ (unsigned long)sp);
sp->u.iocb_cmd.timer.expires = jiffies + tmo * HZ;
- sp->u.iocb_cmd.timer.data = (unsigned long)sp;
- sp->u.iocb_cmd.timer.function = qla2x00_sp_timeout;
add_timer(&sp->u.iocb_cmd.timer);
sp->free = qla2x00_sp_free;
if (IS_QLAFX00(sp->vha->hw) && (sp->type == SRB_FXIOCB_DCMD))
@@ -332,10 +332,9 @@ struct scsi_transport_template *qla2xxx_transport_vport_template = NULL;
__inline__ void
qla2x00_start_timer(scsi_qla_host_t *vha, void *func, unsigned long interval)
{
- init_timer(&vha->timer);
+ setup_timer(&vha->timer, (void (*)(unsigned long))func,
+ (unsigned long)vha);
vha->timer.expires = jiffies + interval * HZ;
- vha->timer.data = (unsigned long)vha;
- vha->timer.function = (void (*)(unsigned long))func;
add_timer(&vha->timer);
vha->timer_active = 1;
}
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, take the first step by switching from init_timer() and open-coded .function and .data assignments to using the old setup_timer() API. Cc: Himanshu Madhani <Himanshu.Madhani@cavium.com> Cc: Bart Van Assche <bart.vanassche@wdc.com> Cc: qla2xxx-upstream@qlogic.com Cc: "Martin K. Petersen" <martin.petersen@oracle.com> Cc: linux-scsi@vger.kernel.org Signed-off-by: Kees Cook <keescook@chromium.org> --- drivers/scsi/qla2xxx/qla_inline.h | 5 ++--- drivers/scsi/qla2xxx/qla_os.c | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-)