From 79ce7649d23fcfff076c93c028a2890a8439e3c4 Mon Sep 17 00:00:00 2001 From: Venu Byravarasu Date: Tue, 13 Mar 2012 10:51:33 +0530 Subject: rtc: tps80031: Fixing POR month comparison As month calculation is modified to fix bug 931452 and POR comparison for month is not updated, fixing it. bug 951622 Change-Id: Ifd906b48c51b155809ed88892579e9dd14abd5a0 Signed-off-by: Venu Byravarasu Reviewed-on: http://git-master/r/89663 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: David Schalig Tested-by: David Schalig Reviewed-by: Laxman Dewangan --- drivers/rtc/rtc-tps80031.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/rtc') diff --git a/drivers/rtc/rtc-tps80031.c b/drivers/rtc/rtc-tps80031.c index 17e4693b3c3e..40e5b7c52129 100644 --- a/drivers/rtc/rtc-tps80031.c +++ b/drivers/rtc/rtc-tps80031.c @@ -365,7 +365,7 @@ static int __devinit tps80031_rtc_probe(struct platform_device *pdev) /* If RTC have POR values, set time using platform data*/ tps80031_rtc_read_time(&pdev->dev, &tm); if ((tm.tm_year == RTC_YEAR_OFFSET + RTC_POR_YEAR) && - (tm.tm_mon == RTC_POR_MONTH) && + (tm.tm_mon == (RTC_POR_MONTH - 1)) && (tm.tm_mday == RTC_POR_DAY)) { if (pdata->time.tm_year < 2000 || pdata->time.tm_year > 2100) { -- cgit v1.2.3