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: <1257371717-547-3-git-send-email-fercerpav@gmail.com>
Date:	Thu,  5 Nov 2009 00:55:16 +0300
From:	Paul Fertser <fercerpav@...il.com>
To:	Alessandro Zummo <a.zummo@...ertech.it>
Cc:	linux-kernel@...r.kernel.org, rtc-linux@...glegroups.com,
	Werner Almesberger <werner@...nmoko.org>,
	Paul Fertser <fercerpav@...il.com>
Subject: [PATCH 2/3] rtc: pcf50633: consider alrm->enable in pcf50633_rtc_set_alarm

From: Werner Almesberger <werner@...nmoko.org>

According to Documentation/rtc.txt, RTC_WKALM_SET sets the alarm time
and enables/disables the alarm. We implement RTC_WKALM_SET through
pcf50633_rtc_set_alarm. The enabling/disabling part was missing.

Signed-off-by: Werner Almesberger <werner@...nmoko.org>
Reported-by: Michael 'Mickey' Lauer <mickey@...nmoko.org>
Signed-off-by: Paul Fertser <fercerpav@...il.com>
---
 drivers/rtc/rtc-pcf50633.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/rtc/rtc-pcf50633.c b/drivers/rtc/rtc-pcf50633.c
index 77b40dd..33a10c4 100644
--- a/drivers/rtc/rtc-pcf50633.c
+++ b/drivers/rtc/rtc-pcf50633.c
@@ -245,8 +245,9 @@ static int pcf50633_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
 	ret = pcf50633_write_block(rtc->pcf, PCF50633_REG_RTCSCA,
 				PCF50633_TI_EXTENT, &pcf_tm.time[0]);
 
-	if (!alarm_masked)
+	if (!alarm_masked || alrm->enabled)
 		pcf50633_irq_unmask(rtc->pcf, PCF50633_IRQ_ALARM);
+	rtc->alarm_enabled = alrm->enabled;
 
 	return ret;
 }
-- 
1.6.0.6

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ