From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752495AbdDIBkQ (ORCPT ); Sat, 8 Apr 2017 21:40:16 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:34679 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752198AbdDIBkC (ORCPT ); Sat, 8 Apr 2017 21:40:02 -0400 From: Geliang Tang To: Dmitry Torokhov , Joe Perches Cc: Geliang Tang , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] Input: turbografx - use setup_timer Date: Sun, 9 Apr 2017 09:39:38 +0800 Message-Id: X-Mailer: git-send-email 2.9.3 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang --- drivers/input/joystick/turbografx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/input/joystick/turbografx.c b/drivers/input/joystick/turbografx.c index 77f575d..a1fdc75 100644 --- a/drivers/input/joystick/turbografx.c +++ b/drivers/input/joystick/turbografx.c @@ -200,9 +200,7 @@ static void tgfx_attach(struct parport *pp) mutex_init(&tgfx->sem); tgfx->pd = pd; tgfx->parportno = pp->number; - init_timer(&tgfx->timer); - tgfx->timer.data = (long) tgfx; - tgfx->timer.function = tgfx_timer; + setup_timer(&tgfx->timer, tgfx_timer, (long)tgfx); for (i = 0; i < n_devs; i++) { if (n_buttons[i] < 1) -- 2.9.3