diff mbox

[07/13] scsi: qla4xxx: use setup_timer() helper.

Message ID 1506073905-12985-8-git-send-email-allen.lkml@gmail.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Allen Sept. 22, 2017, 9:51 a.m. UTC
Use setup_timer function instead of initializing timer with the
   function and data fields.

Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
 drivers/scsi/qla4xxx/ql4_os.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index 64c6fa5..32b3e0e 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -3961,10 +3961,9 @@  static void qla4xxx_start_timer(struct scsi_qla_host *ha, void *func,
 {
 	DEBUG(printk("scsi: %s: Starting timer thread for adapter %d\n",
 		     __func__, ha->host->host_no));
-	init_timer(&ha->timer);
+	setup_timer(&ha->timer, (void(*)(unsigned long))func,
+		    (unsigned long)ha);
 	ha->timer.expires = jiffies + interval * HZ;
-	ha->timer.data = (unsigned long)ha;
-	ha->timer.function = (void (*)(unsigned long))func;
 	add_timer(&ha->timer);
 	ha->timer_active = 1;
 }