Skip to content

Commit

Permalink
[PATCH] rtc-max6902: month conversion fix
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Francisco Larramendi authored and Linus Torvalds committed Oct 17, 2006
1 parent f9b2e97 commit c430169
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/rtc/rtc-max6902.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ static int max6902_get_datetime(struct device *dev, struct rtc_time *dt)
dt->tm_min = BCD2BIN(chip->buf[2]);
dt->tm_hour = BCD2BIN(chip->buf[3]);
dt->tm_mday = BCD2BIN(chip->buf[4]);
dt->tm_mon = BCD2BIN(chip->buf[5] - 1);
dt->tm_mon = BCD2BIN(chip->buf[5]) - 1;
dt->tm_wday = BCD2BIN(chip->buf[6]);
dt->tm_year = BCD2BIN(chip->buf[7]);

Expand Down

0 comments on commit c430169

Please sign in to comment.