aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/rtc/rtc-sysfs.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2015-07-23 16:01:06 -0700
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>2015-09-05 13:19:07 +0200
commitdf100c017ea9f1a6a517c3fba84f8507973c004e (patch)
tree42ba892d7513e5e13d27ef0959a26f9592ae339a /drivers/rtc/rtc-sysfs.c
parentrtc: rx8025: remove obsolete local_irq_disable() and local_irq_enable() for rtc_update_irq() (diff)
downloadwireguard-linux-df100c017ea9f1a6a517c3fba84f8507973c004e.tar.xz
wireguard-linux-df100c017ea9f1a6a517c3fba84f8507973c004e.zip
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/rtc-sysfs.c')
-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,
* suspend-to-disk. So: no attribute unless that side effect is possible.
* (Userspace may disable that mechanism later.)
*/
-static inline int rtc_does_wakealarm(struct rtc_device *rtc)
+static bool rtc_does_wakealarm(struct rtc_device *rtc)
{
if (!device_can_wakeup(rtc->dev.parent))
- return 0;
+ return false;
+
return rtc->ops->set_alarm != NULL;
}