aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2015-07-23 19:01:06 -0400
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>2015-09-05 07:19:07 -0400
commitdf100c017ea9f1a6a517c3fba84f8507973c004e (patch)
tree42ba892d7513e5e13d27ef0959a26f9592ae339a /drivers/rtc
parentf2284f9c900a47961883b88064933a89b5dd5f46 (diff)
rtc: make rtc_does_wakealarm() return boolean
Users of rtc_does_wakealarm() return value treat it as boolean so let's change the signature accordingly. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-sysfs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-sysfs.c b/drivers/rtc/rtc-sysfs.c
index babd43bf3ddc..2fbc11bb4352 100644
--- a/drivers/rtc/rtc-sysfs.c
+++ b/drivers/rtc/rtc-sysfs.c
@@ -230,10 +230,11 @@ static DEVICE_ATTR(wakealarm, S_IRUGO | S_IWUSR,
230 * suspend-to-disk. So: no attribute unless that side effect is possible. 230 * suspend-to-disk. So: no attribute unless that side effect is possible.
231 * (Userspace may disable that mechanism later.) 231 * (Userspace may disable that mechanism later.)
232 */ 232 */
233static inline int rtc_does_wakealarm(struct rtc_device *rtc) 233static bool rtc_does_wakealarm(struct rtc_device *rtc)
234{ 234{
235 if (!device_can_wakeup(rtc->dev.parent)) 235 if (!device_can_wakeup(rtc->dev.parent))
236 return 0; 236 return false;
237
237 return rtc->ops->set_alarm != NULL; 238 return rtc->ops->set_alarm != NULL;
238} 239}
239 240