Hi Mark, On Tue, Dec 27, 2011 at 05:18:27PM +0000, Mark Brown wrote: > 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. > I do not think this is needed. We retrieve platform data only in samsung_keypad_remove() and in suspend/resume methods which AFAIK will not be called until after probe() returns. Thanks. > Signed-off-by: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx> > --- > 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 > -- Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html