From patchwork Sun Apr 9 01:39:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geliang Tang X-Patchwork-Id: 9671467 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 39FB26020C for ; Sun, 9 Apr 2017 01:40:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2C5B32841E for ; Sun, 9 Apr 2017 01:40:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 20D9E2843B; Sun, 9 Apr 2017 01:40:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CE5B92841E for ; Sun, 9 Apr 2017 01:40:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752277AbdDIBkD (ORCPT ); Sat, 8 Apr 2017 21:40:03 -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 Received: by mail-pg0-f67.google.com with SMTP id o123so21429217pga.1; Sat, 08 Apr 2017 18:40:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=VuxTbjeHGsRf+E2vcLfG/QDPLictR5c+Va4pD2dqFa0=; b=T+dprwIPjk7kv2RzkGfh36a907SEG45imnxEvSlYALg8OXCoLet06s8klo8nbCelKf lSFfdqU1KOKOvAt8KOM+BX+hX/dB36yp/OsMlhCaqxiWSCO5NotYjZ2EaBpVWEKJxBhK CcLJMqyHAMdKqZTl8Ik3dfPW+ahsnaTdgVhU/gMVEJnO60l3LfoXDfkttyECBp0r0+s8 iz7+Rf+AIxniilb9EwPvHSPantnSFrY/213ycbzcy7LS28PlSFKbaFL5t7UHl0sTXrUI 5J0iDFh+nYXL0Oisty7XtlrDoN1r9qkdUFnH54Y9XqLPE0ocB/c4iUk7GgTAHW0FzLAZ vs6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=VuxTbjeHGsRf+E2vcLfG/QDPLictR5c+Va4pD2dqFa0=; b=uAMiCPGavBlBkdgPuiBb5bR16uXFwp/Oj7HW/b4FhKmloBfoyn7OjJkUblj5qXogkD 4rWQgEgfehd5sCmF1/d08zwTh8Yma0RbkZxj6eyHrrOqzZoE5llQoHeaGe/mEj1g1Y7+ utxPvdBE4/X6uQqU5RtJRFTC4qAe7yWZTFVibDJ6EUAvSiyTu68d0pqlFpnxJg25MDei ea6k0Cg/6QjUhh+Ik8MB4x53ox1M+GYLnLw0HDyXStktXy2LnmhzyU1VgNZt1T3+Zqu8 lW62H055k4PoA9k32C/fIeB/OYbjwRbuxxPRPMqg8fhO2GTsOfLQdp2TBwXALvB1K/c2 zQ/Q== X-Gm-Message-State: AN3rC/7P7afnppiH18Q3sCFl02RZKHvx9oQko7ainby7tL7J0fvi5/USC775h0DBY/qRbw== X-Received: by 10.84.232.13 with SMTP id h13mr11832992plk.42.1491702001119; Sat, 08 Apr 2017 18:40:01 -0700 (PDT) Received: from localhost (li409-196.members.linode.com. [106.187.89.196]) by smtp.gmail.com with ESMTPSA id 74sm16876701pfn.102.2017.04.08.18.39.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 08 Apr 2017 18:40:00 -0700 (PDT) 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-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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)