linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] Input: samsung-keypad - Set up driver data prior to registering
@ 2011-12-27 17:18 Mark Brown
  2011-12-27 17:18 ` [PATCH 2/2] Input: samsung-keypad - Implement runtime power management support Mark Brown
  2011-12-28  4:33 ` [PATCH 1/2] Input: samsung-keypad - Set up driver data prior to registering Dmitry Torokhov
  0 siblings, 2 replies; 4+ messages in thread
From: Mark Brown @ 2011-12-27 17:18 UTC (permalink / raw)
  To: Dmitry Torokhov, Thomas Abraham; +Cc: linux-input, Mark Brown

As soon as we register the platform device we may be opened and hence
interrupted, meaning that we need to have the driver data set up for the
interrupt handler to use. Move registration of the input device after the
driver data is set up, also moving the wakeup setup for future changes.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 drivers/input/keyboard/samsung-keypad.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/input/keyboard/samsung-keypad.c b/drivers/input/keyboard/samsung-keypad.c
index aa936ee..1aacf07 100644
--- a/drivers/input/keyboard/samsung-keypad.c
+++ b/drivers/input/keyboard/samsung-keypad.c
@@ -467,13 +467,13 @@ static int __devinit samsung_keypad_probe(struct platform_device *pdev)
 		goto err_put_clk;
 	}
 
+	device_init_wakeup(&pdev->dev, pdata->wakeup);
+	platform_set_drvdata(pdev, keypad);
+
 	error = input_register_device(keypad->input_dev);
 	if (error)
 		goto err_free_irq;
 
-	device_init_wakeup(&pdev->dev, pdata->wakeup);
-	platform_set_drvdata(pdev, keypad);
-
 	if (pdev->dev.of_node) {
 		devm_kfree(&pdev->dev, (void *)pdata->keymap_data->keymap);
 		devm_kfree(&pdev->dev, (void *)pdata->keymap_data);
-- 
1.7.7.3


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

end of thread, other threads:[~2011-12-28 11:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-27 17:18 [PATCH 1/2] Input: samsung-keypad - Set up driver data prior to registering Mark Brown
2011-12-27 17:18 ` [PATCH 2/2] Input: samsung-keypad - Implement runtime power management support Mark Brown
2011-12-28  4:33 ` [PATCH 1/2] Input: samsung-keypad - Set up driver data prior to registering Dmitry Torokhov
2011-12-28 11:05   ` Mark Brown

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).