]> git.baikalelectronics.ru Git - kernel.git/commit
rtc/hctosys: only claim the RTC provided the system time if it did
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Wed, 10 Mar 2010 23:20:35 +0000 (15:20 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 12 Mar 2010 23:52:28 +0000 (15:52 -0800)
commit5a89b9bdecd1bacefbb8305b81c46bdd63ba053e
treec7f95b41b5802e6204aa2a26f9168668c1a85a25
parent071cf2785944fc771e430a29190401c435cfd5e9
rtc/hctosys: only claim the RTC provided the system time if it did

Without this patch /sys/class/rtc/$CONFIG_RTC_HCTOSYS_DEVICE/hctosys
contains a 1 (meaning "This rtc was used to initialize the system clock")
even if reading the time at bootup failed.

Moreover change error handling in rtc_hctosys() to use goto and so reduce
the indention level.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Paul Gortmaker <p_gortmaker@yahoo.com>
Acked-by: 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/hctosys.c
drivers/rtc/rtc-sysfs.c
include/linux/rtc.h