]> git.karo-electronics.de Git - karo-tx-linux.git/commit
drivers/rtc/rtc-m41t93.c: don't let get_time() reset M41T93_FLAG_OF
authorNikolaus Voss <n.voss@weinmann.de>
Wed, 25 Apr 2012 01:04:39 +0000 (11:04 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 30 Apr 2012 05:17:37 +0000 (15:17 +1000)
commit4a1fe3f4e5ac10e805f5156f623aef523c534997
tree51e22f3267ef4e30d1dec48b9cb0460358f63b89
parent8b42446e20196185421b4e7bb7de0ae6c6a7c7a4
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>
drivers/rtc/rtc-m41t93.c