[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1440122695-12181-1-git-send-email-dongsheng.wang@freescale.com>
Date: Fri, 21 Aug 2015 10:04:55 +0800
From: Dongsheng Wang <dongsheng.wang@...escale.com>
To: <alexandre.belloni@...e-electrons.com>
CC: <k.kozlowski.k@...il.com>, <rtc-linux@...glegroups.com>,
<linux-kernel@...r.kernel.org>,
Wang Dongsheng <dongsheng.wang@...escale.com>
Subject: [PATCH v3] rtc/ds3232: fix ds3232 get a WARNING trace in resume function
From: Wang Dongsheng <dongsheng.wang@...escale.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@...escale.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists