Skip to content
Commit 2f90b683 authored by Tony Prisk's avatar Tony Prisk Committed by Linus Torvalds
Browse files

drivers/rtc/rtc-vt8500.c: fix handling of data passed in struct rtc_time



tm_mon is 0..11, whereas vt8500 expects 1..12 for the month field,
causing invalid date errors for January, and causing the day field to
roll over incorrectly.

The century flag is only handled in vt8500_rtc_read_time, but not set in
vt8500_rtc_set_time.  This patch corrects the behaviour of the century
flag.

Signed-off-by: default avatarEdgar Toernig <froese@gmx.de>
Signed-off-by: default avatarTony Prisk <linux@prisktech.co.nz>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 532db570
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment