From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Wolfram Sang <wsa@the-dreams.de>, Sekhar Nori <nsekhar@ti.com>,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
Felipe Balbi <balbi@ti.com>, "# v4 . 3" <stable@vger.kernel.org>
Subject: Re: [PATCH] i2c: core: fix wakeup irq parsing
Date: Thu, 12 Nov 2015 10:16:25 -0800 [thread overview]
Message-ID: <20151112181625.GA8494@dtor-ws> (raw)
In-Reply-To: <1447335746-11114-1-git-send-email-grygorii.strashko@ti.com>
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@gmail.com>
> Cc: Felipe Balbi <balbi@ti.com>
> Cc: <stable@vger.kernel.org> # v4.3
> Fixes: 3fffd1283927 ("i2c: allow specifying separate wakeup interrupt in device tree")
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.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
next prev parent reply other threads:[~2015-11-12 18:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-12 13:42 [PATCH] i2c: core: fix wakeup irq parsing Grygorii Strashko
2015-11-12 18:16 ` Dmitry Torokhov [this message]
2015-11-20 15:19 ` Wolfram Sang
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=20151112181625.GA8494@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=balbi@ti.com \
--cc=grygorii.strashko@ti.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nsekhar@ti.com \
--cc=stable@vger.kernel.org \
--cc=wsa@the-dreams.de \
/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).