Input: serio: Convert timers to use timer_setup()
Subsystems (3)
PATCH 1/1 Input: serio: Convert timers to use 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.
Cc Dmitry Torokhov <[email protected]>
Cc Al Viro <[email protected]>
Cc Helge Deller <[email protected]>
Signed-off-by Kees Cook <[email protected]>
--- drivers/input/serio/hp_sdc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/input/serio/hp_sdc.c +2 -3
@@ -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 ;
Signature · 6 lines
2.7.4 -- Kees Cook Pixel Security
Quoted 9 lines · Kees Cook
In preparation for unconditionally passing the struct
timer_listpointer to all timer callbacks, switch to using the newtimer_setup()andfrom_timer()to pass the timer pointer explicitly.Cc Dmitry Torokhov <[email protected]>Cc Al Viro <[email protected]>Cc Helge Deller <[email protected]>Signed-off-by Kees Cook <[email protected]>
Applied, thank you.
Quoted 35 lines
--- drivers/input/serio/hp_sdc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/input/serio/hp_sdc.c +2
-3@@ -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 ;Signature · 6 lines
2.7.4 -- Kees Cook Pixel Security
Signature · 1 line
Dmitry