[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151112181625.GA8494@dtor-ws>
Date: Thu, 12 Nov 2015 10:16:25 -0800
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Grygorii Strashko <grygorii.strashko@...com>
Cc: Wolfram Sang <wsa@...-dreams.de>, Sekhar Nori <nsekhar@...com>,
linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org,
Felipe Balbi <balbi@...com>,
"# v4 . 3" <stable@...r.kernel.org>
Subject: Re: [PATCH] i2c: core: fix wakeup irq parsing
On Thu, Nov 12, 2015 at 03:42:26PM +0200, Grygorii Strashko wrote:
> This patch fixes obvious copy-past error in wake up irq parsing
> code which leads to the fact that dev_pm_set_wake_irq() will
> be called with wrong IRQ number when "wakeup" IRQ is not
> defined in DT.
>
> Cc: Dmitry Torokhov <dmitry.torokhov@...il.com>
> Cc: Felipe Balbi <balbi@...com>
> Cc: <stable@...r.kernel.org> # v4.3
> Fixes: 3fffd1283927 ("i2c: allow specifying separate wakeup interrupt in device tree")
> Signed-off-by: Grygorii Strashko <grygorii.strashko@...com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@...il.com>
I wonder if we should change dev_pm_set_wake_irq and
dev_pm_set_dedicated_wake_irq to check if passed in IRQ is valid.
> ---
> drivers/i2c/i2c-core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
> index 040af5c..ba8eb08 100644
> --- a/drivers/i2c/i2c-core.c
> +++ b/drivers/i2c/i2c-core.c
> @@ -715,7 +715,7 @@ static int i2c_device_probe(struct device *dev)
> if (wakeirq > 0 && wakeirq != client->irq)
> status = dev_pm_set_dedicated_wake_irq(dev, wakeirq);
> else if (client->irq > 0)
> - status = dev_pm_set_wake_irq(dev, wakeirq);
> + status = dev_pm_set_wake_irq(dev, client->irq);
> else
> status = 0;
>
> --
> 2.6.3
>
--
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