All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] rtc/ds3232: fix ds3232 get a WARNING trace in resume function
@ 2015-08-21  2:04 ` Dongsheng Wang
  0 siblings, 0 replies; 2+ messages in thread
From: Dongsheng Wang @ 2015-08-21  2:04 UTC (permalink / raw)
  To: alexandre.belloni; +Cc: k.kozlowski.k, rtc-linux, linux-kernel, Wang Dongsheng

From: Wang Dongsheng <dongsheng.wang@freescale.com>

If ds3232 work on some platform that is not implementation
irq_set_wake, ds3232 will get a WARNING trace in resume.
So fix ds3232->suspended state to false when irq_set_irq_wake
return error.

Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com>
---
*v3*
- Remove kernel trace in commit message.
- s/Can not/Cannot/
*v2*
- Use dev_warn_once to instead of dev_info

diff --git a/drivers/rtc/rtc-ds3232.c b/drivers/rtc/rtc-ds3232.c
index 7e48e53..3554970 100644
--- a/drivers/rtc/rtc-ds3232.c
+++ b/drivers/rtc/rtc-ds3232.c
@@ -463,7 +463,10 @@ static int ds3232_suspend(struct device *dev)
 
 	if (device_can_wakeup(dev)) {
 		ds3232->suspended = true;
-		irq_set_irq_wake(client->irq, 1);
+		if (irq_set_irq_wake(client->irq, 1)) {
+			dev_warn_once(dev, "Cannot set wakeup sources\n");
+			ds3232->suspended = false;
+		}
 	}
 
 	return 0;
-- 
2.1.0.27.g96db324


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

* [rtc-linux] [PATCH v3] rtc/ds3232: fix ds3232 get a WARNING trace in resume function
@ 2015-08-21  2:04 ` Dongsheng Wang
  0 siblings, 0 replies; 2+ messages in thread
From: Dongsheng Wang @ 2015-08-21  2:04 UTC (permalink / raw)
  To: alexandre.belloni; +Cc: k.kozlowski.k, rtc-linux, linux-kernel, Wang Dongsheng

From: Wang Dongsheng <dongsheng.wang@freescale.com>

If ds3232 work on some platform that is not implementation
irq_set_wake, ds3232 will get a WARNING trace in resume.
So fix ds3232->suspended state to false when irq_set_irq_wake
return error.

Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com>
---
*v3*
- Remove kernel trace in commit message.
- s/Can not/Cannot/
*v2*
- Use dev_warn_once to instead of dev_info

diff --git a/drivers/rtc/rtc-ds3232.c b/drivers/rtc/rtc-ds3232.c
index 7e48e53..3554970 100644
--- a/drivers/rtc/rtc-ds3232.c
+++ b/drivers/rtc/rtc-ds3232.c
@@ -463,7 +463,10 @@ static int ds3232_suspend(struct device *dev)
 
 	if (device_can_wakeup(dev)) {
 		ds3232->suspended = true;
-		irq_set_irq_wake(client->irq, 1);
+		if (irq_set_irq_wake(client->irq, 1)) {
+			dev_warn_once(dev, "Cannot set wakeup sources\n");
+			ds3232->suspended = false;
+		}
 	}
 
 	return 0;
-- 
2.1.0.27.g96db324

-- 
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

end of thread, other threads:[~2015-08-21  2:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-21  2:04 [PATCH v3] rtc/ds3232: fix ds3232 get a WARNING trace in resume function Dongsheng Wang
2015-08-21  2:04 ` [rtc-linux] " Dongsheng Wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.