Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965639AbdCXOPn (ORCPT ); Fri, 24 Mar 2017 10:15:43 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:33802 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965508AbdCXOP2 (ORCPT ); Fri, 24 Mar 2017 10:15:28 -0400 From: Geliang Tang To: "Ed L. Cashin" Cc: Geliang Tang , linux-kernel@vger.kernel.org Subject: [PATCH] aoe: use setup_timer Date: Fri, 24 Mar 2017 22:15:09 +0800 Message-Id: <4841d2c2936addc27a2e774041d04ec16885ba03.1490341208.git.geliangtang@gmail.com> X-Mailer: git-send-email 2.9.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 661 Lines: 25 Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang --- drivers/block/aoe/aoemain.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/block/aoe/aoemain.c b/drivers/block/aoe/aoemain.c index 4b987c2..20865d4 100644 --- a/drivers/block/aoe/aoemain.c +++ b/drivers/block/aoe/aoemain.c @@ -28,10 +28,8 @@ discover_timer(ulong vp) switch (vp) { case TINIT: - init_timer(&t); + setup_timer(&t, discover_timer, TRUN); spin_lock_init(&lock); - t.data = TRUN; - t.function = discover_timer; die = 0; case TRUN: spin_lock_irqsave(&lock, flags); -- 2.9.3