]> git.baikalelectronics.ru Git - kernel.git/commit
drivers/rtc/rtc-m41t93.c: don't let get_time() reset M41T93_FLAG_OF
authorNikolaus Voss <n.voss@weinmann.de>
Tue, 29 May 2012 22:07:39 +0000 (15:07 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 29 May 2012 23:22:33 +0000 (16:22 -0700)
commit99aba32f4850ed4a8b984736e00a57ce769f1d8f
treeec0394305953a3e28e32b7045ffabc12784c2987
parent4b136fed3844f66940c3c1881857aae3590ed21d
drivers/rtc/rtc-m41t93.c: don't let get_time() reset M41T93_FLAG_OF

If the rtc reports the time might be invalid due to oscillator failure,
M41T93_FLAG_OF flag must not be reset by get_time() as the read operation
doesn't make the time valid.

Without this patch, only the first get_time() reported an invalid time,
the second get_time() reported a valid time althought the reported time is
probably wrong due to oscillator failure.

Instead of resetting in get_time(), with this patch M41T93_FLAG_OF is
reset in set_time() when a valid time is to be written.

Signed-off-by: Nikolaus Voss <n.voss@weinmann.de>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/rtc/rtc-m41t93.c