From patchwork Tue Oct 24 14:18:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 10024665 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 B25026035E for ; Tue, 24 Oct 2017 14:18:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A681028474 for ; Tue, 24 Oct 2017 14:18:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9B3152851A; Tue, 24 Oct 2017 14:18:53 +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 201A6284D4 for ; Tue, 24 Oct 2017 14:18:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932181AbdJXOSv (ORCPT ); Tue, 24 Oct 2017 10:18:51 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:47978 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932184AbdJXOSs (ORCPT ); Tue, 24 Oct 2017 10:18:48 -0400 Received: by mail-pg0-f67.google.com with SMTP id r25so14645709pgn.4 for ; Tue, 24 Oct 2017 07:18:47 -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=Bg8Uu4rW7+nfFzoo0mL4JXt+2wvrQt7L0deBVFuxnoo=; b=Q6399Zbl2kUKbREShQbDUtTNpaggV30+SeJosF8DHKH1t2XlupwEuemdfHAhq1l8Fb Nx4y5odJfxnc3NTKk5Di6Fp8GxDv3a/sUDW9w74g3dGMd4buYVgVgYLBdYbYrYo5Mz7O V3pX77p/YBpn7TLd4Zo49XcTAE9zKsggJG5ow= 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=Bg8Uu4rW7+nfFzoo0mL4JXt+2wvrQt7L0deBVFuxnoo=; b=ek6jxrlwMwFrAYRFeQ0QoQy0WNyS6psLAFe2RKOuThkAoGmmfyVeNzkSXAaFFB9eBY cNlFNRb90LEiHrpVFygk1BVACHKcpAlXDhcEbv07adhkJ7UCjKZDYWMxR/uRx8gVTVmo i20JyYjq8SUOHr3RxoltS7PfKIGKF7cyjF2fKU6aVWtTWMCME+lm7fMmL6ORUuAoPSA7 FFyZTom898IUEpAXnrRAdoAXK/1Enn7XoczxCa3m4fRfflmZ3k2ZS3JT0P5cSpftZ1gQ pH7PhoBSIJlT3tHV2dnrPXgKOyv2++w9eJamFoQMU8cmxjAfkxidXZGp8XHTal0Ghr8W PgaQ== X-Gm-Message-State: AMCzsaXXxRoJ1KMYqr1zfib+5dhl2Hof0hutvdGX9XrIu1mJ3zJodYep V7xwqdMWg33mNPT/CpjbxAqHLg== X-Google-Smtp-Source: ABhQp+SJGrWuqlaYzTVcDDutycx1NBXZG8AYMmZGJotrqqdF3YIZ8lRQ5Q8mFH13nhfdNGiozuZkIA== X-Received: by 10.99.56.78 with SMTP id h14mr14935156pgn.192.1508854727085; Tue, 24 Oct 2017 07:18:47 -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 b22sm1128443pfj.123.2017.10.24.07.18.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Oct 2017 07:18:46 -0700 (PDT) Date: Tue, 24 Oct 2017 07:18:45 -0700 From: Kees Cook To: Dmitry Torokhov Cc: Al Viro , Helge Deller , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] Input: serio: Convert timers to use timer_setup() Message-ID: <20171024141845.GA78031@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: Al Viro Cc: Helge Deller Cc: linux-input@vger.kernel.org Signed-off-by: Kees Cook --- drivers/input/serio/hp_sdc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/input/serio/hp_sdc.c b/drivers/input/serio/hp_sdc.c index 8eef6849d066..1d7c7d81a5ef 100644 --- a/drivers/input/serio/hp_sdc.c +++ b/drivers/input/serio/hp_sdc.c @@ -794,7 +794,7 @@ int hp_sdc_release_cooked_irq(hp_sdc_irqhook *callback) /************************* Keepalive timer task *********************/ -static void hp_sdc_kicker(unsigned long data) +static void hp_sdc_kicker(struct timer_list *unused) { tasklet_schedule(&hp_sdc.task); /* Re-insert the periodic task. */ @@ -909,9 +909,8 @@ static int __init hp_sdc_init(void) down(&s_sync); /* Wait for t_sync to complete */ /* Create the keepalive task */ - init_timer(&hp_sdc.kicker); + timer_setup(&hp_sdc.kicker, hp_sdc_kicker, 0); hp_sdc.kicker.expires = jiffies + HZ; - hp_sdc.kicker.function = &hp_sdc_kicker; add_timer(&hp_sdc.kicker); hp_sdc.dev_err = 0;