linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rtc: snvs: return error in case enable_irq_wake fails
@ 2016-04-20 23:09 Stefan Agner
  2016-04-21 23:22 ` Alexandre Belloni
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Agner @ 2016-04-20 23:09 UTC (permalink / raw)
  To: a.zummo, alexandre.belloni; +Cc: rtc-linux, linux-kernel, Stefan Agner

If enable_irq_wake fails, we should return that error code so that
entering suspend fails. Otherwise we will get a WARNING along with
the hint of a unbalanced wake disable:
Unbalanced IRQ 37 wake disable

Signed-off-by: Stefan Agner <stefan@agner.ch>
---
 drivers/rtc/rtc-snvs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-snvs.c b/drivers/rtc/rtc-snvs.c
index 950c5d0..0f11c2a2 100644
--- a/drivers/rtc/rtc-snvs.c
+++ b/drivers/rtc/rtc-snvs.c
@@ -322,7 +322,7 @@ static int snvs_rtc_suspend(struct device *dev)
 	struct snvs_rtc_data *data = dev_get_drvdata(dev);
 
 	if (device_may_wakeup(dev))
-		enable_irq_wake(data->irq);
+		return enable_irq_wake(data->irq);
 
 	return 0;
 }
-- 
2.8.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] rtc: snvs: return error in case enable_irq_wake fails
  2016-04-20 23:09 [PATCH] rtc: snvs: return error in case enable_irq_wake fails Stefan Agner
@ 2016-04-21 23:22 ` Alexandre Belloni
  0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Belloni @ 2016-04-21 23:22 UTC (permalink / raw)
  To: Stefan Agner; +Cc: a.zummo, rtc-linux, linux-kernel

On 20/04/2016 at 16:09:57 -0700, Stefan Agner wrote :
> If enable_irq_wake fails, we should return that error code so that
> entering suspend fails. Otherwise we will get a WARNING along with
> the hint of a unbalanced wake disable:
> Unbalanced IRQ 37 wake disable
> 
> Signed-off-by: Stefan Agner <stefan@agner.ch>
> ---
>  drivers/rtc/rtc-snvs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
Applied, thanks.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-04-21 23:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-20 23:09 [PATCH] rtc: snvs: return error in case enable_irq_wake fails Stefan Agner
2016-04-21 23:22 ` Alexandre Belloni

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).