From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Thomas Abraham <thomas.abraham@linaro.org>, linux-input@vger.kernel.org
Subject: Re: [PATCH 1/2] Input: samsung-keypad - Set up driver data prior to registering
Date: Tue, 27 Dec 2011 20:33:54 -0800 [thread overview]
Message-ID: <20111228043353.GA19976@core.coreip.homeip.net> (raw)
In-Reply-To: <1325006308-21149-1-git-send-email-broonie@opensource.wolfsonmicro.com>
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@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
>
--
Dmitry
next prev parent reply other threads:[~2011-12-28 4:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Dmitry Torokhov [this message]
2011-12-28 11:05 ` [PATCH 1/2] Input: samsung-keypad - Set up driver data prior to registering Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111228043353.GA19976@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linux-input@vger.kernel.org \
--cc=thomas.abraham@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).