All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] Input: omap-keypad: set tasklet data earlier
@ 2016-01-07  9:36 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2016-01-07  9:36 UTC (permalink / raw)
  To: Dmitry Torokhov, Komal Shah; +Cc: linux-input, kernel-janitors

It feels like we should set the tasklet data before enabling it.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/input/keyboard/omap-keypad.c b/drivers/input/keyboard/omap-keypad.c
index 7502e46..75ad666 100644
--- a/drivers/input/keyboard/omap-keypad.c
+++ b/drivers/input/keyboard/omap-keypad.c
@@ -292,8 +292,8 @@ static int omap_kp_probe(struct platform_device *pdev)
 	setup_timer(&omap_kp->timer, omap_kp_timer, (unsigned long)omap_kp);
 
 	/* get the irq and init timer*/
-	tasklet_enable(&kp_tasklet);
 	kp_tasklet.data = (unsigned long) omap_kp;
+	tasklet_enable(&kp_tasklet);
 
 	ret = device_create_file(&pdev->dev, &dev_attr_enable);
 	if (ret < 0)

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

* [patch] Input: omap-keypad: set tasklet data earlier
@ 2016-01-07  9:36 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2016-01-07  9:36 UTC (permalink / raw)
  To: Dmitry Torokhov, Komal Shah; +Cc: linux-input, kernel-janitors

It feels like we should set the tasklet data before enabling it.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/input/keyboard/omap-keypad.c b/drivers/input/keyboard/omap-keypad.c
index 7502e46..75ad666 100644
--- a/drivers/input/keyboard/omap-keypad.c
+++ b/drivers/input/keyboard/omap-keypad.c
@@ -292,8 +292,8 @@ static int omap_kp_probe(struct platform_device *pdev)
 	setup_timer(&omap_kp->timer, omap_kp_timer, (unsigned long)omap_kp);
 
 	/* get the irq and init timer*/
-	tasklet_enable(&kp_tasklet);
 	kp_tasklet.data = (unsigned long) omap_kp;
+	tasklet_enable(&kp_tasklet);
 
 	ret = device_create_file(&pdev->dev, &dev_attr_enable);
 	if (ret < 0)

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

* Re: [patch] Input: omap-keypad: set tasklet data earlier
  2016-01-07  9:36 ` Dan Carpenter
@ 2016-01-07 17:55   ` Dmitry Torokhov
  -1 siblings, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2016-01-07 17:55 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Komal Shah, linux-input, kernel-janitors

On Thu, Jan 07, 2016 at 12:36:48PM +0300, Dan Carpenter wrote:
> It feels like we should set the tasklet data before enabling it.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied, thank you.

> 
> diff --git a/drivers/input/keyboard/omap-keypad.c b/drivers/input/keyboard/omap-keypad.c
> index 7502e46..75ad666 100644
> --- a/drivers/input/keyboard/omap-keypad.c
> +++ b/drivers/input/keyboard/omap-keypad.c
> @@ -292,8 +292,8 @@ static int omap_kp_probe(struct platform_device *pdev)
>  	setup_timer(&omap_kp->timer, omap_kp_timer, (unsigned long)omap_kp);
>  
>  	/* get the irq and init timer*/
> -	tasklet_enable(&kp_tasklet);
>  	kp_tasklet.data = (unsigned long) omap_kp;
> +	tasklet_enable(&kp_tasklet);
>  
>  	ret = device_create_file(&pdev->dev, &dev_attr_enable);
>  	if (ret < 0)

-- 
Dmitry

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

* Re: [patch] Input: omap-keypad: set tasklet data earlier
@ 2016-01-07 17:55   ` Dmitry Torokhov
  0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2016-01-07 17:55 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Komal Shah, linux-input, kernel-janitors

On Thu, Jan 07, 2016 at 12:36:48PM +0300, Dan Carpenter wrote:
> It feels like we should set the tasklet data before enabling it.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied, thank you.

> 
> diff --git a/drivers/input/keyboard/omap-keypad.c b/drivers/input/keyboard/omap-keypad.c
> index 7502e46..75ad666 100644
> --- a/drivers/input/keyboard/omap-keypad.c
> +++ b/drivers/input/keyboard/omap-keypad.c
> @@ -292,8 +292,8 @@ static int omap_kp_probe(struct platform_device *pdev)
>  	setup_timer(&omap_kp->timer, omap_kp_timer, (unsigned long)omap_kp);
>  
>  	/* get the irq and init timer*/
> -	tasklet_enable(&kp_tasklet);
>  	kp_tasklet.data = (unsigned long) omap_kp;
> +	tasklet_enable(&kp_tasklet);
>  
>  	ret = device_create_file(&pdev->dev, &dev_attr_enable);
>  	if (ret < 0)

-- 
Dmitry

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

end of thread, other threads:[~2016-01-07 17:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-07  9:36 [patch] Input: omap-keypad: set tasklet data earlier Dan Carpenter
2016-01-07  9:36 ` Dan Carpenter
2016-01-07 17:55 ` Dmitry Torokhov
2016-01-07 17:55   ` Dmitry Torokhov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.