rtc: pcf50633: fix month off-by-one error

The PCF50633 stores a month value of 1-12, but the kernel wants 0-11.

Signed-off-by: Rask Ingemann Lambertsen <rask@sygehus.dk>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Cc: Paul Gortmaker <p_gortmaker@yahoo.com>
Cc: Balaji Rao <balajirrao@openmoko.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by Rask Ingemann Lambertsen and committed by Linus Torvalds 265f2a05 431861cf

+2 -2
+2 -2
drivers/rtc/rtc-pcf50633.c
··· 70 rtc->tm_hour = bcd2bin(pcf->time[PCF50633_TI_HOUR]); 71 rtc->tm_wday = bcd2bin(pcf->time[PCF50633_TI_WKDAY]); 72 rtc->tm_mday = bcd2bin(pcf->time[PCF50633_TI_DAY]); 73 - rtc->tm_mon = bcd2bin(pcf->time[PCF50633_TI_MONTH]); 74 rtc->tm_year = bcd2bin(pcf->time[PCF50633_TI_YEAR]) + 100; 75 } 76 ··· 81 pcf->time[PCF50633_TI_HOUR] = bin2bcd(rtc->tm_hour); 82 pcf->time[PCF50633_TI_WKDAY] = bin2bcd(rtc->tm_wday); 83 pcf->time[PCF50633_TI_DAY] = bin2bcd(rtc->tm_mday); 84 - pcf->time[PCF50633_TI_MONTH] = bin2bcd(rtc->tm_mon); 85 pcf->time[PCF50633_TI_YEAR] = bin2bcd(rtc->tm_year % 100); 86 } 87
··· 70 rtc->tm_hour = bcd2bin(pcf->time[PCF50633_TI_HOUR]); 71 rtc->tm_wday = bcd2bin(pcf->time[PCF50633_TI_WKDAY]); 72 rtc->tm_mday = bcd2bin(pcf->time[PCF50633_TI_DAY]); 73 + rtc->tm_mon = bcd2bin(pcf->time[PCF50633_TI_MONTH]) - 1; 74 rtc->tm_year = bcd2bin(pcf->time[PCF50633_TI_YEAR]) + 100; 75 } 76 ··· 81 pcf->time[PCF50633_TI_HOUR] = bin2bcd(rtc->tm_hour); 82 pcf->time[PCF50633_TI_WKDAY] = bin2bcd(rtc->tm_wday); 83 pcf->time[PCF50633_TI_DAY] = bin2bcd(rtc->tm_mday); 84 + pcf->time[PCF50633_TI_MONTH] = bin2bcd(rtc->tm_mon + 1); 85 pcf->time[PCF50633_TI_YEAR] = bin2bcd(rtc->tm_year % 100); 86 } 87