scsi: zfcp: use setup_timer instead of init_timer
authorLukáš Korenčik <xkorenc1@fi.muni.cz>
Fri, 28 Jul 2017 10:30:48 +0000 (12:30 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 10 Aug 2017 23:36:53 +0000 (19:36 -0400)
Use initialization with setup_timer function instead of using
init_timer function and data fields. It improves readability.

Signed-off-by: Lukáš Korenčik <xkorenc1@fi.muni.cz>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Benjamin Block <bblock@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/s390/scsi/zfcp_erp.c

index 7ccfce55903423f5e998fe3d93f6942a5879376f..37408f5f81ce84e5f4f598069bbc417edff71469 100644 (file)
@@ -572,9 +572,8 @@ static void zfcp_erp_memwait_handler(unsigned long data)
 
 static void zfcp_erp_strategy_memwait(struct zfcp_erp_action *erp_action)
 {
-       init_timer(&erp_action->timer);
-       erp_action->timer.function = zfcp_erp_memwait_handler;
-       erp_action->timer.data = (unsigned long) erp_action;
+       setup_timer(&erp_action->timer, zfcp_erp_memwait_handler,
+                   (unsigned long) erp_action);
        erp_action->timer.expires = jiffies + HZ;
        add_timer(&erp_action->timer);
 }