linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] Input: omap-keypad: set tasklet data earlier
@ 2016-01-07  9:36 Dan Carpenter
  2016-01-07 17:55 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ 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] 2+ messages in thread

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

Thread overview: 2+ 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 17:55 ` 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).