diff options
author | Jinyoung Park <jinyoungp@nvidia.com> | 2012-03-06 23:02:12 +0900 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2012-03-14 16:40:12 -0700 |
commit | 9c75057dfff925b4e42e8a07ffb2a2efa9e6bd14 (patch) | |
tree | 184fab46b24df51a5e1faffff5fcc7878971435d /drivers/rtc | |
parent | 05823d9c1c04ff87b78d24e6c44e8880263f048f (diff) |
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 <jinyoungp@nvidia.com>
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 <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-max77663.c | 6 |
1 files changed, 3 insertions, 3 deletions
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"); |