From patchwork Sun Apr 9 01:39:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geliang Tang X-Patchwork-Id: 9671453 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 EEDB76020C for ; Sun, 9 Apr 2017 01:39:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CD6CC2841E for ; Sun, 9 Apr 2017 01:39:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AF9682843B; Sun, 9 Apr 2017 01:39:48 +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 5BF4A2841E for ; Sun, 9 Apr 2017 01:39:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751922AbdDIBjr (ORCPT ); Sat, 8 Apr 2017 21:39:47 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:35058 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751610AbdDIBjq (ORCPT ); Sat, 8 Apr 2017 21:39:46 -0400 Received: by mail-pg0-f68.google.com with SMTP id g2so21375822pge.2; Sat, 08 Apr 2017 18:39:46 -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; bh=B67tqktxC8UjS3+c+DAf3bRYAxNjBzq+EMsov5/8V9k=; b=b+Avu/Vs2Xb/17Bf+YvuCB0rZtbchDeAeo/yYdlxCOqrB2U1Xq0mk3nOjJ1ahCjf+n WKt4lpAHirnP/+EupF2RM51M7B/ZSZz6Fhx1tweR0eUdBxduUZ+VYHYq7TaTe/dxqhKC uo6sTBpwZX4ipBkkvY6EB9fujX0dKzwTeIs3G8mOKE72O/2l/u2HVqqVDGFd8WvLibwq S95h97p2kCLDLFyxpQSSOoNvBXFknQNRJ/tYAedEGaFxucqcWrBbTX0OzcKbBLaGDA0f KXnGBJ959qUumBemNmRsV4tXAiWxZMH+pN7TA+U3+w9PzC0Dr/jV9WgsHJEQa8IA9NHb VoZA== 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; bh=B67tqktxC8UjS3+c+DAf3bRYAxNjBzq+EMsov5/8V9k=; b=Rd6JqEN3B+C61x42d1etpzLd6ibnsGOoPLWErzyKfSPIu084NX5K3ra2sFJwdAGw8q IijFb+nVzqq1DSvxqv0007TcvVEUVyt8QN5D2uTrHm2Sf98akv2deRiIp5o/JWFuxTK/ vSitn61Vi0otDh77OPmoMdhobLWmpqZ2ejTUrC5D95kv4mTlx6xE88H+KfqnucxLKhMF 81QfcH0JmrJTy+vIQL046D5Nq2GMu2S/epCUYzyB8YZB5+o75SMqmSHXRYs4XJYO9Aoe GLTuOAdVACpl5TzionwyTwaBZ99U46LBzxSgef++EuNvpkKrwZD2CcwUSJMagR65uLlQ OgnA== X-Gm-Message-State: AN3rC/5lJMltE2/x5MY8qrf7zzlU1hMvK2f89P/F/91kweVoM4WwlALRX90QRD/SLCc7TA== X-Received: by 10.84.238.198 with SMTP id l6mr5528157pln.95.1491701985578; Sat, 08 Apr 2017 18:39:45 -0700 (PDT) Received: from localhost (li409-196.members.linode.com. [106.187.89.196]) by smtp.gmail.com with ESMTPSA id z21sm16940398pgc.53.2017.04.08.18.39.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 08 Apr 2017 18:39:45 -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 1/4] Input: db9 - use setup_timer Date: Sun, 9 Apr 2017 09:39:35 +0800 Message-Id: X-Mailer: git-send-email 2.9.3 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/db9.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/input/joystick/db9.c b/drivers/input/joystick/db9.c index da32609..f4ad83e 100644 --- a/drivers/input/joystick/db9.c +++ b/drivers/input/joystick/db9.c @@ -609,9 +609,7 @@ static void db9_attach(struct parport *pp) db9->pd = pd; db9->mode = mode; db9->parportno = pp->number; - init_timer(&db9->timer); - db9->timer.data = (long) db9; - db9->timer.function = db9_timer; + setup_timer(&db9->timer, db9_timer, (long)db9); for (i = 0; i < (min(db9_mode->n_pads, DB9_MAX_DEVICES)); i++) {