lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210317081936.26583-2-l.stelmach@samsung.com>
Date:   Wed, 17 Mar 2021 09:19:36 +0100
From:   Łukasz Stelmach <l.stelmach@...sung.com>
To:     alexandre.belloni@...tlin.com
Cc:     l.stelmach@...sung.com, a.zummo@...ertech.it,
        b.zolnierkie@...sung.com, linux-kernel@...r.kernel.org,
        linux-rtc@...r.kernel.org, m.szyprowski@...sung.com
Subject: [PATCH 2/2] WIP: Provide has_alarm method

Signed-off-by: Łukasz Stelmach <l.stelmach@...sung.com>
---
 drivers/rtc/rtc-ds1307.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c
index b21e06583bd5..dee60f459a3e 100644
--- a/drivers/rtc/rtc-ds1307.c
+++ b/drivers/rtc/rtc-ds1307.c
@@ -387,6 +387,13 @@ static int ds1307_set_time(struct device *dev, struct rtc_time *t)
 	return 0;
 }
 
+static int ds1307_has_alarm(struct device *dev)
+{
+	struct ds1307 *ds1307 = dev_get_drvdata(dev);
+
+	return test_bit(HAS_ALARM, &ds1307->flags);
+}
+
 static int ds1337_read_alarm(struct device *dev, struct rtc_wkalrm *t)
 {
 	struct ds1307		*ds1307 = dev_get_drvdata(dev);
@@ -1201,6 +1208,7 @@ static const struct rtc_class_ops ds13xx_rtc_ops = {
 	.read_alarm	= ds1337_read_alarm,
 	.set_alarm	= ds1337_set_alarm,
 	.alarm_irq_enable = ds1307_alarm_irq_enable,
+	.has_alarm	= ds1307_has_alarm,
 };
 
 static ssize_t frequency_test_store(struct device *dev,
-- 
2.26.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ