diff options
author | Daniel Fu <danifu@nvidia.com> | 2012-09-05 11:45:04 +0800 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2012-09-06 14:33:42 -0700 |
commit | e81b06d36a924dcdf8bb0456e7a50d1634d0365f (patch) | |
tree | 2f875d0ee05aa0489f92fbc307bff0f0aef9f320 /drivers | |
parent | e96e462aee43ed8699f5cd64728c389e92ef402e (diff) |
rtc: max77663: fix alarm reading bug
When reading alarm of RTC-max77663, it didn't set alrm->enabled correctly,
if irq is masked, means disable alarm, alrm->enabled should be set to 0,
else it should be 1.
Change-Id: Id0b1ffd9a816643712f33624d7d52cbe7b66b3c3
Signed-off-by: Daniel Fu <danifu@nvidia.com>
Reviewed-on: http://git-master/r/129593
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/rtc/rtc-max77663.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-max77663.c b/drivers/rtc/rtc-max77663.c index a84dcc73f0ec..d6dac76944d6 100644 --- a/drivers/rtc/rtc-max77663.c +++ b/drivers/rtc/rtc-max77663.c @@ -432,9 +432,9 @@ static int max77663_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) alrm->time.tm_wday); if (rtc->irq_mask & RTC_IRQ_ALARM1_MASK) - alrm->enabled = 1; - else alrm->enabled = 0; + else + alrm->enabled = 1; return 0; } |