[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120806081915.GA4518@core.coreip.homeip.net>
Date: Mon, 6 Aug 2012 01:19:15 -0700
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Lee Jones <lee.jones@...aro.org>
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
STEricsson_nomadik_linux@...t.st.com, linus.walleij@...ricsson.com,
arnd@...db.de, linux-input@...r.kernel.org
Subject: Re: [PATCH 1/1] Input: ab8500-ponkey: Make the distinction between
DT and non-DT boots
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@...aro.org>
> Signed-off-by: Lee Jones <lee.jones@...aro.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists