From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932229AbdJXOSy (ORCPT ); Tue, 24 Oct 2017 10:18:54 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:49904 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932182AbdJXOSs (ORCPT ); Tue, 24 Oct 2017 10:18:48 -0400 X-Google-Smtp-Source: ABhQp+SJGrWuqlaYzTVcDDutycx1NBXZG8AYMmZGJotrqqdF3YIZ8lRQ5Q8mFH13nhfdNGiozuZkIA== 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-Type: text/plain; charset=us-ascii Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; -- 2.7.4 -- Kees Cook Pixel Security