aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
authorFrancisco Larramendi <flarramendi@gmail.com>2006-10-17 03:09:53 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-17 11:18:44 -0400
commitc430169e0c9f42f2cd27e0a6161e7ff4dc7e608d (patch)
tree9d91a42684644fdf76c8c7b0667beeb36b52dcf3 /drivers/rtc
parentf9b2e97bea228739b74b541033b1119c5707200b (diff)
[PATCH] rtc-max6902: month conversion fix
Fix October-only BCD-to-binary conversion bug: 0x08 -> 7 0x09 -> 8 0x10 -> 15 (!) 0x11 -> 19 Fixes http://bugzilla.kernel.org/show_bug.cgi?id=7361 Cc: Raphael Assenat <raph@raphnet.net> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-max6902.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-max6902.c b/drivers/rtc/rtc-max6902.c
index 0b20dfacbf59..d94170728075 100644
--- a/drivers/rtc/rtc-max6902.c
+++ b/drivers/rtc/rtc-max6902.c
@@ -136,7 +136,7 @@ static int max6902_get_datetime(struct device *dev, struct rtc_time *dt)
136 dt->tm_min = BCD2BIN(chip->buf[2]); 136 dt->tm_min = BCD2BIN(chip->buf[2]);
137 dt->tm_hour = BCD2BIN(chip->buf[3]); 137 dt->tm_hour = BCD2BIN(chip->buf[3]);
138 dt->tm_mday = BCD2BIN(chip->buf[4]); 138 dt->tm_mday = BCD2BIN(chip->buf[4]);
139 dt->tm_mon = BCD2BIN(chip->buf[5] - 1); 139 dt->tm_mon = BCD2BIN(chip->buf[5]) - 1;
140 dt->tm_wday = BCD2BIN(chip->buf[6]); 140 dt->tm_wday = BCD2BIN(chip->buf[6]);
141 dt->tm_year = BCD2BIN(chip->buf[7]); 141 dt->tm_year = BCD2BIN(chip->buf[7]);
142 142