Use setup_timer function instead of initializing timer with the
   function and data fields.

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

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;
 }
-- 
2.7.4

Reply via email to