rtc: make rtc_does_wakealarm() return boolean
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 23 Jul 2015 23:01:06 +0000 (16:01 -0700)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Sat, 5 Sep 2015 11:19:07 +0000 (13:19 +0200)
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>
drivers/rtc/rtc-sysfs.c

index babd43bf3ddc36d101171a62fa78445ef454db42..2fbc11bb4352fd3e83b2ceb6ba270fb1406f10e8 100644 (file)
@@ -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;
 }