From e81b06d36a924dcdf8bb0456e7a50d1634d0365f Mon Sep 17 00:00:00 2001 From: Daniel Fu Date: Wed, 5 Sep 2012 11:45:04 +0800 Subject: 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 Reviewed-on: http://git-master/r/129593 Reviewed-by: Simone Willett Tested-by: Simone Willett --- drivers/rtc/rtc-max77663.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/rtc') 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; } -- cgit v1.2.3