From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Lee Jones <lee.jones@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
STEricsson_nomadik_linux@list.st.com,
linus.walleij@stericsson.com, arnd@arndb.de,
linux-input@vger.kernel.org
Subject: Re: [PATCH 1/1] Input: ab8500-ponkey: Make the distinction between DT and non-DT boots
Date: Mon, 6 Aug 2012 01:19:15 -0700 [thread overview]
Message-ID: <20120806081915.GA4518@core.coreip.homeip.net> (raw)
In-Reply-To: <1344256323-10484-1-git-send-email-lee.jones@linaro.org>
Hi Lee,
On Mon, Aug 06, 2012 at 01:32:03PM +0100, Lee Jones wrote:
> If we're booting with Device Tree enabled, we want the IRQ numbers to
> be taken and translated from the Device Tree binary. If not, they
> should be taken from the resource allocation defined in the AB8500 MFD
> core driver.
>
> Tested-by: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
> drivers/input/misc/ab8500-ponkey.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/input/misc/ab8500-ponkey.c b/drivers/input/misc/ab8500-ponkey.c
> index 1a1d974..afcd87f 100644
> --- a/drivers/input/misc/ab8500-ponkey.c
> +++ b/drivers/input/misc/ab8500-ponkey.c
> @@ -47,6 +47,7 @@ static irqreturn_t ab8500_ponkey_handler(int irq, void *data)
> static int __devinit ab8500_ponkey_probe(struct platform_device *pdev)
> {
> struct ab8500 *ab8500 = dev_get_drvdata(pdev->dev.parent);
> + struct device_node *np = pdev->dev.of_node;
> struct ab8500_ponkey *ponkey;
> struct input_dev *input;
> int irq_dbf, irq_dbr;
> @@ -73,8 +74,9 @@ static int __devinit ab8500_ponkey_probe(struct platform_device *pdev)
>
> ponkey->idev = input;
> ponkey->ab8500 = ab8500;
> - ponkey->irq_dbf = ab8500_irq_get_virq(ab8500, irq_dbf);
> - ponkey->irq_dbr = ab8500_irq_get_virq(ab8500, irq_dbr);
> +
> + ponkey->irq_dbf = (np) ? ab8500_irq_get_virq(ab8500, irq_dbf) : irq_dbf;
> + ponkey->irq_dbr = (np) ? ab8500_irq_get_virq(ab8500, irq_dbr) : irq_dbr;
Why this isn't done inside ab8500_irq_get_virq()?
Thanks.
--
Dmitry
next prev parent reply other threads:[~2012-08-06 8:19 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-06 12:32 [PATCH 1/1] Input: ab8500-ponkey: Make the distinction between DT and non-DT boots Lee Jones
2012-08-06 8:19 ` Dmitry Torokhov [this message]
2012-08-06 15:37 ` Lee Jones
2012-08-06 16:02 ` Mark Brown
2012-08-06 17:24 ` Lee Jones
2012-08-07 17:01 ` Lee Jones
2012-08-07 17:03 ` Mark Brown
2012-08-08 7:35 ` Lee Jones
2012-08-08 8:04 ` Lee Jones
2012-08-08 8:28 ` Arnd Bergmann
2012-08-08 9:59 ` Mark Brown
2012-08-08 9:49 ` Mark Brown
2012-08-08 11:40 ` Lee Jones
2012-08-08 13:17 ` Mark Brown
2012-09-13 9:35 ` Linus Walleij
2012-09-14 8:03 ` Lee Jones
2012-09-18 11:22 ` Linus Walleij
2012-09-19 17:11 ` Dmitry Torokhov
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=20120806081915.GA4518@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=STEricsson_nomadik_linux@list.st.com \
--cc=arnd@arndb.de \
--cc=lee.jones@linaro.org \
--cc=linus.walleij@stericsson.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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).