From patchwork Mon Jun 27 11:43:25 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2/3] rtc: rtc-s3c: Disable alarm entries that are not chosen. Date: Mon, 27 Jun 2011 01:43:25 -0000 From: MyungJoo Ham X-Patchwork-Id: 102150 Message-Id: <1309175006-9218-3-git-send-email-myungjoo.ham@samsung.com> To: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, rtc-linux@googlegroups.com Cc: Kukjin Kim , Changhwan Youn , ben-linux@fluff.org, a.zummo@towertech.it, kyungmin.park@samsung.com, dg77.kim@samsung.com, myungjoo.ham@gmail.com When rtc_setalarm is called, the entries that are not chosen (entries without valid time values) should be disabled. However, in the previous rtc-s3c driver, they are not explicitly disabled (did not changed). This patch allows to disable such entries even if they were previously used. Signed-off-by: MyungJoo Ham Signed-off-by: Kyungmin Park --- drivers/rtc/rtc-s3c.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c index 3c8dfa7..be85ea5 100644 --- a/drivers/rtc/rtc-s3c.c +++ b/drivers/rtc/rtc-s3c.c @@ -273,7 +273,8 @@ static int s3c_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm) 1900 + tm->tm_year, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec); - alrm_en = readb(base + S3C2410_RTCALM) & S3C2410_RTCALM_ALMEN; + /* Disable entires that are not chosen by alrm */ + alrm_en = S3C2410_RTCALM_ALMEN; writeb(0x00, base + S3C2410_RTCALM); if (tm->tm_sec < 60 && tm->tm_sec >= 0) {