public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/3] RTC: make rtc_does_wakealarm() return boolean
@ 2015-07-23 23:01 Dmitry Torokhov
  2015-07-23 23:01 ` [PATCH v2 2/3] RTC: switch wakealarm attribute to DEVICE_ATTR_RW Dmitry Torokhov
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Dmitry Torokhov @ 2015-07-23 23:01 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: Alessandro Zummo, rtc-linux, linux-kernel, Krzysztof Kozlowski

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


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-08-05  1:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-23 23:01 [PATCH v2 1/3] RTC: make rtc_does_wakealarm() return boolean Dmitry Torokhov
2015-07-23 23:01 ` [PATCH v2 2/3] RTC: switch wakealarm attribute to DEVICE_ATTR_RW Dmitry Torokhov
2015-07-24  4:08   ` Krzysztof Kozlowski
2015-08-05  1:40   ` Alexandre Belloni
2015-07-23 23:01 ` [PATCH v2 3/3] RTC: switch to using is_visible() to control sysfs attributes Dmitry Torokhov
2015-07-24  4:10   ` Krzysztof Kozlowski
2015-08-05  1:41   ` Alexandre Belloni
2015-07-24  4:10 ` [PATCH v2 1/3] RTC: make rtc_does_wakealarm() return boolean Krzysztof Kozlowski
2015-08-05  1:40 ` Alexandre Belloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox