From patchwork Tue Oct 24 14:18:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 10024675 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 DA1236035E for ; Tue, 24 Oct 2017 14:19:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CDE5128474 for ; Tue, 24 Oct 2017 14:19:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CC752284D4; Tue, 24 Oct 2017 14:19:24 +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_SIGNED, 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 6BE39285CE for ; Tue, 24 Oct 2017 14:19:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932239AbdJXOS5 (ORCPT ); Tue, 24 Oct 2017 10:18:57 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:51143 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932185AbdJXOSy (ORCPT ); Tue, 24 Oct 2017 10:18:54 -0400 Received: by mail-pf0-f193.google.com with SMTP id b6so19789248pfh.7 for ; Tue, 24 Oct 2017 07:18:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=P+e7Txwa4onEpcPau+jCqwLu6NYqzFRwb7HizT7gPng=; b=aw1aAzf4Ed3BghEuhqzScriiA/9mbmdPN/5omXnMEx2Q0zBTTpbJ4Pc4BW2GKeRF+0 JxiqoBYzGEq3oKGZyZp2rNziPpTew29uShewkHuhSXOLca0zAeFZEyTRz45Sqyi/IdwP JsGanBG9BXlJlfGXuVeKo7Xc6kfVCVvjBbyCM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=P+e7Txwa4onEpcPau+jCqwLu6NYqzFRwb7HizT7gPng=; b=oz3x1xWtZvd2zfIqZZ3WIP3nnB2Srk+2JEU3L9ONIRQUSktwOGNz+OJUnhNn8W2NSu nkSC58l4qdRwplvfBlVKCXWt57VzysDzt+O3g/OM0PiL+9KE2lQZ7YJm73HTtBlbtvVx jfDUkVwHNv7ZyGj5XZjGqC/s32/x54/H18Nia7C1CIZkj/kREzNQGHq/k6cUl8sNYtUf ELZENFa3Cz8T7uw1EAQevRpVzxS/h49CAhChStg9MG8MFXT9jFx5YLc8tOQsAXHWzko3 53L1m8/vdsI0HPHffxKla3X5pPka3y2sn/raWmpkcdW2Nux2Z0+0Evdr5uQT9HJQmCpY 89sg== X-Gm-Message-State: AMCzsaXOFdF8uYusYoekTIgPKnYXmWKYHpec9sl/9ASFf2CYJg3+KCUZ ugiJQ5XRGFKlKwxEuir9aISV0w== X-Google-Smtp-Source: ABhQp+R6l8rp2pyr2C3ENePPM+sOGX43qOYsdJ3Fvs3Y7QfSAalFROhPJlUn16FPJyBGIVlbqVAbnQ== X-Received: by 10.84.245.145 with SMTP id j17mr12843888pll.163.1508854733900; Tue, 24 Oct 2017 07:18:53 -0700 (PDT) Received: from www.outflux.net (173-164-112-133-Oregon.hfc.comcastbusiness.net. [173.164.112.133]) by smtp.gmail.com with ESMTPSA id h70sm979305pfc.88.2017.10.24.07.18.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Oct 2017 07:18:52 -0700 (PDT) Date: Tue, 24 Oct 2017 07:18:51 -0700 From: Kees Cook To: Dmitry Torokhov Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] Input: Serio/hil_mlc: Convert timers to use timer_setup() Message-ID: <20171024141851.GA78046@beast> MIME-Version: 1.0 Content-Disposition: inline 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 In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Dmitry Torokhov Cc: linux-input@vger.kernel.org Signed-off-by: Kees Cook --- drivers/input/serio/hil_mlc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/serio/hil_mlc.c b/drivers/input/serio/hil_mlc.c index 65605e4ef3cf..d66d01c5373b 100644 --- a/drivers/input/serio/hil_mlc.c +++ b/drivers/input/serio/hil_mlc.c @@ -784,7 +784,7 @@ static void hil_mlcs_process(unsigned long unused) /************************* Keepalive timer task *********************/ -static void hil_mlcs_timer(unsigned long data) +static void hil_mlcs_timer(struct timer_list *unused) { hil_mlcs_probe = 1; tasklet_schedule(&hil_mlcs_tasklet); @@ -998,7 +998,7 @@ int hil_mlc_unregister(hil_mlc *mlc) static int __init hil_mlc_init(void) { - setup_timer(&hil_mlcs_kicker, &hil_mlcs_timer, 0); + timer_setup(&hil_mlcs_kicker, &hil_mlcs_timer, 0); mod_timer(&hil_mlcs_kicker, jiffies + HZ); tasklet_enable(&hil_mlcs_tasklet);