Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1191392

[PATCH v2 1/3] RTC: make rtc_does_wakealarm() return boolean

From Dmitry Torokhov <dmitry.torokhov@gmail.com>
Newsgroups linux.kernel
Subject [PATCH v2 1/3] RTC: make rtc_does_wakealarm() return boolean
Date 2015-07-24 01:10 +0200
Message-ID <pPxMJ-4tL-9@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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>
---
 drivers/rtc/rtc-sysfs.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/rtc/rtc-sysfs.c b/drivers/rtc/rtc-sysfs.c
index babd43b..2fbc11b 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;
 }
 
-- 
2.5.0.rc2.392.g76e840b

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 1/3] RTC: make rtc_does_wakealarm() return boolean Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2015-07-24 01:10 +0200
  [PATCH v2 2/3] RTC: switch wakealarm attribute to DEVICE_ATTR_RW Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2015-07-24 01:10 +0200
  [PATCH v2 3/3] RTC: switch to using is_visible() to control sysfs attributes Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2015-07-24 01:10 +0200

csiph-web