From patchwork Sun Apr 9 01:39:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geliang Tang X-Patchwork-Id: 9671457 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 6CC0D6020C for ; Sun, 9 Apr 2017 01:40:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5EA962841E for ; Sun, 9 Apr 2017 01:40:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 51A0F2843B; Sun, 9 Apr 2017 01:40:01 +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 E702A2841E for ; Sun, 9 Apr 2017 01:40:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751610AbdDIBj7 (ORCPT ); Sat, 8 Apr 2017 21:39:59 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:36451 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752072AbdDIBjv (ORCPT ); Sat, 8 Apr 2017 21:39:51 -0400 Received: by mail-pg0-f65.google.com with SMTP id 81so21417183pgh.3; Sat, 08 Apr 2017 18:39:51 -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=8W6T+aV7l3GnNyyM5kAh2LVjbXOrQHesIcdVLvW6i6A=; b=TfJotmtF6qrcRenJVeh62+2gx8wbX/nC/Dhl1t0fi1axM7Xil/GnWvWramJD6effqh HWo/RguLaGZ857RV6Z9p1oRZRqAz60FzXSaWZKcpbXlXotiTaJEQAEm+Qfr64nHohKwW FBrLqZryzg5r00i+lnEGYm05iRrquh8CPij43hWXnubZLcL41TZOmMtYjLKlSrwv8Aw5 IU66b+c8IvhArNwWUBdcR4FOgCL/eFC0fq1BC8k8sZ9kFSJZnJADnU+cjUi3qdovUAoI vBAIuI9xnDhC3ox/4mmuzTQcytHaE4Ba2PN8PApkrGCHs21LGs7n2FfLFvZH6H8yrQJC N96g== 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=8W6T+aV7l3GnNyyM5kAh2LVjbXOrQHesIcdVLvW6i6A=; b=TVky/lAN8csrLTqcaALirBEidBHZ2YiZ5jh0kBZBV2w1NuwmDsZcD9OAWs0ccyYxpq FrZ9lhZOQMkDhbNFQqhUdNeTOjfaQOfGbDs+NZwWmg41tn2edMeOiEqjPvMhAUb2M1AC pDlPt9OsVXXMPpFH3vQ4rdSi2w4gm1IqVAxOhiF1w4PRFCfWbqKGrLihQ/Sv1b9QQxK7 /KYZEhFuQyM1Ij+OtHrcY92DP/3B1QkFFL82dQJFy+aocpxoj68gW0ePy7MQAwGud5Jj aIbIoCJB/Afj+xAtA+0/+gdNxZWGZ+cgM5XgaRuhf4KiTxdEU4Z2fWJ8efTpZvcsksTT 62KQ== X-Gm-Message-State: AFeK/H2j6SuZnBzTkRXIMnDchZrbUkMPlC9z3oGQVqWSNY8rUa00/6Zf2O8i+3Cku6XGiQ== X-Received: by 10.84.241.74 with SMTP id u10mr19222937plm.28.1491701991247; Sat, 08 Apr 2017 18:39:51 -0700 (PDT) Received: from localhost (li409-196.members.linode.com. [106.187.89.196]) by smtp.gmail.com with ESMTPSA id l9sm16903405pfi.97.2017.04.08.18.39.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 08 Apr 2017 18:39:50 -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 2/4] Input: gameport - use setup_timer Date: Sun, 9 Apr 2017 09:39:36 +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/gameport/gameport.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/input/gameport/gameport.c b/drivers/input/gameport/gameport.c index 092cc41..cedc665 100644 --- a/drivers/input/gameport/gameport.c +++ b/drivers/input/gameport/gameport.c @@ -542,9 +542,8 @@ static void gameport_init_port(struct gameport *gameport) INIT_LIST_HEAD(&gameport->node); spin_lock_init(&gameport->timer_lock); - init_timer(&gameport->poll_timer); - gameport->poll_timer.function = gameport_run_poll_handler; - gameport->poll_timer.data = (unsigned long)gameport; + setup_timer(&gameport->poll_timer, gameport_run_poll_handler, + (unsigned long)gameport); } /*