drivers/rtc/rtc-rx8581.c: fix setdatetime
authorRudolf Marek <rudolf.marek@sysgo.com>
Tue, 27 Jul 2010 20:18:02 +0000 (13:18 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 27 Jul 2010 21:32:06 +0000 (14:32 -0700)
commit2884fce165047db7df422e52a672970fa09c87b5
tree9382e655a17b7be04178b0fa0d6978f88fd8ecb6
parentb82bab4bbe9efa7bc7177fc20620fff19bd95484
drivers/rtc/rtc-rx8581.c: fix setdatetime

Fix the logic while writing new date/time to the chip.  The driver
incorrectly wrote back register values to different registers and even
with wrong mask.  The patch adds clearing of the VLF register, which
should be cleared if all date/time values are set.

Signed-off-by: Rudolf Marek <rudolf.marek@sysgo.com>
Acked-by: Wan ZongShun <mcuos.com@gmail.com>
Cc: Martyn Welch <martyn.welch@gefanuc.com>
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>
drivers/rtc/rtc-rx8581.c