[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1225121905-23782-1-git-send-email-broonie@opensource.wolfsonmicro.com>
Date: Mon, 27 Oct 2008 15:38:24 +0000
From: Mark Brown <broonie@...nsource.wolfsonmicro.com>
To: Alessandro Zummo <a.zummo@...ertech.it>,
David Brownell <david-b@...bell.net>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, rtc-linux@...glegroups.com,
Mark Brown <broonie@...nsource.wolfsonmicro.com>
Subject: [PATCH 1/2] rtc: Fix handling of missing tm_year data when reading alarms
When fixing up invalid years rtc_read_alarm() is callign rtc_valid_tm()
as a boolean but rtc_valid_tm() returns zero on success or a negative
number if the time is not valid so the test is inverted.
Signed-off-by: Mark Brown <broonie@...nsource.wolfsonmicro.com>
---
drivers/rtc/interface.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c
index 7af60b9..a04c1b6 100644
--- a/drivers/rtc/interface.c
+++ b/drivers/rtc/interface.c
@@ -271,7 +271,7 @@ int rtc_read_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm)
dev_dbg(&rtc->dev, "alarm rollover: %s\n", "year");
do {
alarm->time.tm_year++;
- } while (!rtc_valid_tm(&alarm->time));
+ } while (rtc_valid_tm(&alarm->time) != 0);
break;
default:
--
1.5.6.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists