]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
rtc_sysfs_show_hctosys(): display 0 if resume failed
authorDavid Fries <david@fries.net>
Thu, 13 Sep 2012 01:01:21 +0000 (11:01 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 13 Sep 2012 07:28:13 +0000 (17:28 +1000)
commit236cfbc8fcdab3541599b3c97f0923f18367b8ea
tree1b7d49b8d155fd84f84a7f9cb587bcb1c18b80f4
parent766e54d7a1b59e901b94f962ea9c93b26375571f
rtc_sysfs_show_hctosys(): display 0 if resume failed

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 setting the time by do_settimeofday() at bootup failed.
The RTC can also be used to set the clock on resume, if it did 1,
otherwise 0.  Previously there was no indication if the RTC was used
to set the clock in resume.

This uses only CONFIG_RTC_HCTOSYS_DEVICE for conditional compilation
instead of it and CONFIG_RTC_HCTOSYS to be more consistent.
rtc_hctosys_ret was moved to class.c so class.c no longer depends on
hctosys.c.

Signed-off-by: David Fries <David@Fries.net>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/rtc/class.c
drivers/rtc/hctosys.c
drivers/rtc/rtc-sysfs.c
include/linux/rtc.h