Skip to contentSkip to conversation

Input: omap-keypad: set tasklet data earlier

PATCH Applied Dan Carpenter 2 participants 2 messages Jan 7, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Input: omap-keypad: set tasklet data earlier

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

drivers/input/keyboard/omap-keypad.c +1 -1
index 7502e46..75ad666 100644
@@ -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)
maintainer Applied
#1 lore raw
Quoted 3 lines · Dan Carpenter

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

Applied, thank you.

Quoted 15 lines
drivers/input/keyboard/omap-keypad.c +1 -1
index 7502e46..75ad666 100644
@@ -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)
Signature · 1 line
Dmitry