Commit 05e0be7c authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Dmitry Torokhov

Input: synaptics-rmi4 - fix reversed conditions in enable/disable_irq_wake

These tests are reversed.  A warning should be displayed if an error is
returned, not on success.
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 3f5c34c6
...@@ -901,7 +901,7 @@ void rmi_enable_irq(struct rmi_device *rmi_dev, bool clear_wake) ...@@ -901,7 +901,7 @@ void rmi_enable_irq(struct rmi_device *rmi_dev, bool clear_wake)
data->enabled = true; data->enabled = true;
if (clear_wake && device_may_wakeup(rmi_dev->xport->dev)) { if (clear_wake && device_may_wakeup(rmi_dev->xport->dev)) {
retval = disable_irq_wake(irq); retval = disable_irq_wake(irq);
if (!retval) if (retval)
dev_warn(&rmi_dev->dev, dev_warn(&rmi_dev->dev,
"Failed to disable irq for wake: %d\n", "Failed to disable irq for wake: %d\n",
retval); retval);
...@@ -936,7 +936,7 @@ void rmi_disable_irq(struct rmi_device *rmi_dev, bool enable_wake) ...@@ -936,7 +936,7 @@ void rmi_disable_irq(struct rmi_device *rmi_dev, bool enable_wake)
disable_irq(irq); disable_irq(irq);
if (enable_wake && device_may_wakeup(rmi_dev->xport->dev)) { if (enable_wake && device_may_wakeup(rmi_dev->xport->dev)) {
retval = enable_irq_wake(irq); retval = enable_irq_wake(irq);
if (!retval) if (retval)
dev_warn(&rmi_dev->dev, dev_warn(&rmi_dev->dev,
"Failed to enable irq for wake: %d\n", "Failed to enable irq for wake: %d\n",
retval); retval);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment