From: Kees Cook Date: Tue, 24 Oct 2017 16:43:31 +0000 (-0700) Subject: Input: hp_sdc - convert to using timer_setup() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=a4f60b5047b155029edbef0ef0006bb8c8c83ba3;p=openwrt%2Fstaging%2Fblogic.git Input: hp_sdc - convert to using timer_setup() 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. Signed-off-by: Kees Cook Signed-off-by: Dmitry Torokhov --- 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;