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 > Cc: Felipe Balbi > Cc: # v4.3 > Fixes: 3fffd1283927 ("i2c: allow specifying separate wakeup interrupt in > device tree") > Signed-off-by: Grygorii Strashko Applied to for-current, thanks! signature.asc Description: Digital signature
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 > Cc: Felipe Balbi > Cc: # v4.3 > Fixes: 3fffd1283927 ("i2c: allow specifying separate wakeup interrupt in > device tree") > Signed-off-by: Grygorii Strashko Acked-by: Dmitry Torokhov 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-i2c" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] i2c: core: fix wakeup irq parsing
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 Cc: Felipe Balbi Cc: # v4.3 Fixes: 3fffd1283927 ("i2c: allow specifying separate wakeup interrupt in device tree") Signed-off-by: Grygorii Strashko --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html