Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752105AbdCCNWp (ORCPT ); Fri, 3 Mar 2017 08:22:45 -0500 Received: from mx2.suse.de ([195.135.220.15]:40832 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752086AbdCCNWo (ORCPT ); Fri, 3 Mar 2017 08:22:44 -0500 From: Jiri Slaby To: maier@linux.vnet.ibm.com Cc: linux-kernel@vger.kernel.org, =?UTF-8?q?Luk=C3=A1=C5=A1=20Koren=C4=8Dik?= , Jiri Slaby , Martin Schwidefsky , Heiko Carstens , linux-s390@vger.kernel.org Subject: [PATCH] s390: scsi, use setup_timer instead of init_timer Date: Fri, 3 Mar 2017 13:46:00 +0100 Message-Id: <20170303124600.30225-1-jslaby@suse.cz> X-Mailer: git-send-email 2.12.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1206 Lines: 33 From: Lukáš Korenčik Use inicialization with setup_timer function instead of using init_timer function and data fields. It improves readability. Signed-off-by: Lukáš Korenčik Signed-off-by: Jiri Slaby Cc: Steffen Maier Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: --- drivers/s390/scsi/zfcp_erp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c index 7ccfce559034..14c0cbe335b3 100644 --- a/drivers/s390/scsi/zfcp_erp.c +++ b/drivers/s390/scsi/zfcp_erp.c @@ -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); } -- 2.12.0