linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: Serio/hil_mlc: Convert timers to use timer_setup()
@ 2017-10-24 14:18 Kees Cook
  2017-10-24 17:05 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Kees Cook @ 2017-10-24 14:18 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-input, linux-kernel

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 <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
---
 drivers/input/serio/hil_mlc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/input/serio/hil_mlc.c b/drivers/input/serio/hil_mlc.c
index 65605e4ef3cf..d66d01c5373b 100644
--- a/drivers/input/serio/hil_mlc.c
+++ b/drivers/input/serio/hil_mlc.c
@@ -784,7 +784,7 @@ static void hil_mlcs_process(unsigned long unused)
 
 /************************* Keepalive timer task *********************/
 
-static void hil_mlcs_timer(unsigned long data)
+static void hil_mlcs_timer(struct timer_list *unused)
 {
 	hil_mlcs_probe = 1;
 	tasklet_schedule(&hil_mlcs_tasklet);
@@ -998,7 +998,7 @@ int hil_mlc_unregister(hil_mlc *mlc)
 
 static int __init hil_mlc_init(void)
 {
-	setup_timer(&hil_mlcs_kicker, &hil_mlcs_timer, 0);
+	timer_setup(&hil_mlcs_kicker, &hil_mlcs_timer, 0);
 	mod_timer(&hil_mlcs_kicker, jiffies + HZ);
 
 	tasklet_enable(&hil_mlcs_tasklet);
-- 
2.7.4


-- 
Kees Cook
Pixel Security

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Input: Serio/hil_mlc: Convert timers to use timer_setup()
  2017-10-24 14:18 [PATCH] Input: Serio/hil_mlc: Convert timers to use timer_setup() Kees Cook
@ 2017-10-24 17:05 ` Dmitry Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2017-10-24 17:05 UTC (permalink / raw)
  To: Kees Cook; +Cc: linux-input, linux-kernel

On Tue, Oct 24, 2017 at 07:18:51AM -0700, Kees Cook wrote:
> 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 <dmitry.torokhov@gmail.com>
> Cc: linux-input@vger.kernel.org
> Signed-off-by: Kees Cook <keescook@chromium.org>

Applied, thank you.

> ---
>  drivers/input/serio/hil_mlc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/input/serio/hil_mlc.c b/drivers/input/serio/hil_mlc.c
> index 65605e4ef3cf..d66d01c5373b 100644
> --- a/drivers/input/serio/hil_mlc.c
> +++ b/drivers/input/serio/hil_mlc.c
> @@ -784,7 +784,7 @@ static void hil_mlcs_process(unsigned long unused)
>  
>  /************************* Keepalive timer task *********************/
>  
> -static void hil_mlcs_timer(unsigned long data)
> +static void hil_mlcs_timer(struct timer_list *unused)
>  {
>  	hil_mlcs_probe = 1;
>  	tasklet_schedule(&hil_mlcs_tasklet);
> @@ -998,7 +998,7 @@ int hil_mlc_unregister(hil_mlc *mlc)
>  
>  static int __init hil_mlc_init(void)
>  {
> -	setup_timer(&hil_mlcs_kicker, &hil_mlcs_timer, 0);
> +	timer_setup(&hil_mlcs_kicker, &hil_mlcs_timer, 0);
>  	mod_timer(&hil_mlcs_kicker, jiffies + HZ);
>  
>  	tasklet_enable(&hil_mlcs_tasklet);
> -- 
> 2.7.4
> 
> 
> -- 
> Kees Cook
> Pixel Security

-- 
Dmitry

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-10-24 17:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-24 14:18 [PATCH] Input: Serio/hil_mlc: Convert timers to use timer_setup() Kees Cook
2017-10-24 17:05 ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).