Skip to content

Commit

Permalink
i2c: fix wakeup irq parsing
Browse files Browse the repository at this point in the history
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.

Fixes: 3fffd12 ("i2c: allow specifying separate wakeup interrupt in device tree")
Signed-off-by: Grygorii Strashko <[email protected]>
Acked-by: Dmitry Torokhov <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
Cc: <[email protected]> # v4.3
  • Loading branch information
grygoriyS authored and Wolfram Sang committed Nov 20, 2015
1 parent d0fe525 commit c18fba2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/i2c/i2c-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit c18fba2

Please sign in to comment.