From patchwork Sun Apr 9 01:39:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geliang Tang X-Patchwork-Id: 9671459 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 DC86F6020C for ; Sun, 9 Apr 2017 01:40:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC8D12843B for ; Sun, 9 Apr 2017 01:40:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BE9CC2841E; Sun, 9 Apr 2017 01:40:07 +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 7B9D32841E for ; Sun, 9 Apr 2017 01:40:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752347AbdDIBkF (ORCPT ); Sat, 8 Apr 2017 21:40:05 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:36473 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752181AbdDIBkC (ORCPT ); Sat, 8 Apr 2017 21:40:02 -0400 Received: by mail-pg0-f68.google.com with SMTP id 81so21417343pgh.3; Sat, 08 Apr 2017 18:39:57 -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=SoOtVeYG5MhaXenMjS6e+zZxe7HO8JML/+/1YG7XKLU=; b=FtXXCRJ2Ow1GbxNAm6AByEkNtJFjSToqGP30T8e2CWVHMWEpl0yeuSdPsvRE+WSLP0 tJSooTRHu0Jb1BO+SDn8yWm3BFjnC6m5X9mab/d2jxzB9H0VZZKjQYuRyuB6en7GBMW8 fakKwo44WoP5/PD2Xupcn3apNkhmk7Yrug+L0geHcasJbiu9yJBRaPLM6Nv1BajxAqlN wTGCnquOSMoRvKcHPCbGZmro+hgCy8K5BSJJRgCSdIvLhIL7NKIDmF76kHLb2lPiFwzI 4J0cETOtVCRSKVlBYVmgUY7Sxy/8X4tvS4yA+gwi9i9QY9NacF10+IKscTYjQGensBOO 2mFw== 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=SoOtVeYG5MhaXenMjS6e+zZxe7HO8JML/+/1YG7XKLU=; b=WqbsCzHdxdS001rZjCrOFfNKZiRjE9A/oo8nwgyhKPaVXzWu/CWObGGpCZF17vdzU0 W5oo2bEo/x8qK7BScgDuBWbRWMrauUYF6Z9wXZnmmxKTy4K2YYZDArdkVUQp+Leg50LF y7jfNNZEc4Dq45zxVDxr1o5m9iXtaaKoPN0Fy2CI/YHiW/Arg7FH6XbcvxBLXiJmwLXy xBwXv5HwuNvSQinH7wudAst3L6H5NwOWB/WzkicepqU7xskycBgrWOwWvo7Knz7Y5XSu QJ5o8LteIgbEpWILXPTolVPQZ3Ga+8zUEV6sqL52ZYRMQhD6FWJuRb7BsaCGpehiZ7JK gTJw== X-Gm-Message-State: AFeK/H2Ub48U17DIxiT3/g3/LdlfiFA2hs/JEBMvQdHdHJtKORh+QVR0YEAqs972EDvyEg== X-Received: by 10.98.31.148 with SMTP id l20mr47050698pfj.258.1491701996439; Sat, 08 Apr 2017 18:39:56 -0700 (PDT) Received: from localhost (li409-196.members.linode.com. [106.187.89.196]) by smtp.gmail.com with ESMTPSA id s21sm17001578pgg.65.2017.04.08.18.39.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 08 Apr 2017 18:39:56 -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 3/4] Input: locomokbd - use setup_timer Date: Sun, 9 Apr 2017 09:39:37 +0800 Message-Id: <5bbe944c53fd30d26689e515f306180c03b9abc8.1490951519.git.geliangtang@gmail.com> 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/keyboard/locomokbd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/input/keyboard/locomokbd.c b/drivers/input/keyboard/locomokbd.c index c94d610..0d74312d 100644 --- a/drivers/input/keyboard/locomokbd.c +++ b/drivers/input/keyboard/locomokbd.c @@ -264,9 +264,8 @@ static int locomokbd_probe(struct locomo_dev *dev) spin_lock_init(&locomokbd->lock); - init_timer(&locomokbd->timer); - locomokbd->timer.function = locomokbd_timer_callback; - locomokbd->timer.data = (unsigned long) locomokbd; + setup_timer(&locomokbd->timer, locomokbd_timer_callback, + (unsigned long)locomokbd); locomokbd->suspend_jiffies = jiffies;