From 9c75057dfff925b4e42e8a07ffb2a2efa9e6bd14 Mon Sep 17 00:00:00 2001 From: Jinyoung Park Date: Tue, 6 Mar 2012 23:02:12 +0900 Subject: rtc: max77663: Use alrm->enabled flag to enable rtc alarm irq Use alrm->enabled flag to enable rtc alarm irq in rtc_set_alrm function. Signed-off-by: Jinyoung Park Reviewed-on: http://git-master/r/88048 (cherry picked from commit 41e8686fc049fbdc0e83ecfa3f68da06ff813b99) Change-Id: Ieb3b9863233b9d5bfc06459ef479c47a5e700d3b Reviewed-on: http://git-master/r/89739 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Varun Colbert Tested-by: Varun Colbert --- drivers/rtc/rtc-max77663.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/rtc') diff --git a/drivers/rtc/rtc-max77663.c b/drivers/rtc/rtc-max77663.c index 1354b8306256..874a2df86dc1 100644 --- a/drivers/rtc/rtc-max77663.c +++ b/drivers/rtc/rtc-max77663.c @@ -444,10 +444,10 @@ static int max77663_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm) int ret; dev_dbg(rtc->dev, "rtc_set_alarm: " - "tm: %d-%02d-%02d %02d:%02d:%02d, wday=%d\n", + "tm: %d-%02d-%02d %02d:%02d:%02d, wday=%d [%s]\n", alrm->time.tm_year, alrm->time.tm_mon, alrm->time.tm_mday, alrm->time.tm_hour, alrm->time.tm_min, alrm->time.tm_sec, - alrm->time.tm_wday); + alrm->time.tm_wday, alrm->enabled?"enable":"disable"); ret = max77663_rtc_tm_to_reg(rtc, buf, &alrm->time, 1); if (ret < 0) { @@ -469,7 +469,7 @@ static int max77663_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm) return ret; } - ret = max77663_rtc_alarm_irq_enable(dev, 1); + ret = max77663_rtc_alarm_irq_enable(dev, alrm->enabled); if (ret < 0) { dev_err(rtc->dev, "rtc_set_alarm: Failed to enable rtc alarm\n"); -- cgit v1.2.3