瀏覽代碼

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 <keescook@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Kees Cook 7 年之前
父節點
當前提交
a4f60b5047
共有 1 個文件被更改,包括 2 次插入3 次删除
  1. 2 3
      drivers/input/serio/hp_sdc.c

+ 2 - 3
drivers/input/serio/hp_sdc.c

@@ -794,7 +794,7 @@ int hp_sdc_release_cooked_irq(hp_sdc_irqhook *callback)
 
 
 /************************* Keepalive timer task *********************/
 /************************* 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);
 	tasklet_schedule(&hp_sdc.task);
 	/* Re-insert the periodic 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 */
 	down(&s_sync); /* Wait for t_sync to complete */
 
 
 	/* Create the keepalive task */
 	/* 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.expires = jiffies + HZ;
-	hp_sdc.kicker.function = &hp_sdc_kicker;
 	add_timer(&hp_sdc.kicker);
 	add_timer(&hp_sdc.kicker);
 
 
 	hp_sdc.dev_err = 0;
 	hp_sdc.dev_err = 0;