diff options
author | David S. Miller <davem@davemloft.net> | 2009-11-19 01:19:03 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-19 01:19:03 -0500 |
commit | 3505d1a9fd65e2d3e00827857b6795d9d8983658 (patch) | |
tree | 941cfafdb57c427bb6b7ebf6354ee93b2a3693b5 /arch/powerpc/kernel/time.c | |
parent | dfef948ed2ba69cf041840b5e860d6b4e16fa0b1 (diff) | |
parent | 66b00a7c93ec782d118d2c03bd599cfd041e80a1 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/sfc/sfe4001.c
drivers/net/wireless/libertas/cmd.c
drivers/staging/Kconfig
drivers/staging/Makefile
drivers/staging/rtl8187se/Kconfig
drivers/staging/rtl8192e/Kconfig
Diffstat (limited to 'arch/powerpc/kernel/time.c')
-rw-r--r-- | arch/powerpc/kernel/time.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 92dc844299b6..a136a11c490d 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -777,7 +777,7 @@ int update_persistent_clock(struct timespec now) | |||
777 | return ppc_md.set_rtc_time(&tm); | 777 | return ppc_md.set_rtc_time(&tm); |
778 | } | 778 | } |
779 | 779 | ||
780 | void read_persistent_clock(struct timespec *ts) | 780 | static void __read_persistent_clock(struct timespec *ts) |
781 | { | 781 | { |
782 | struct rtc_time tm; | 782 | struct rtc_time tm; |
783 | static int first = 1; | 783 | static int first = 1; |
@@ -800,10 +800,23 @@ void read_persistent_clock(struct timespec *ts) | |||
800 | return; | 800 | return; |
801 | } | 801 | } |
802 | ppc_md.get_rtc_time(&tm); | 802 | ppc_md.get_rtc_time(&tm); |
803 | |||
803 | ts->tv_sec = mktime(tm.tm_year+1900, tm.tm_mon+1, tm.tm_mday, | 804 | ts->tv_sec = mktime(tm.tm_year+1900, tm.tm_mon+1, tm.tm_mday, |
804 | tm.tm_hour, tm.tm_min, tm.tm_sec); | 805 | tm.tm_hour, tm.tm_min, tm.tm_sec); |
805 | } | 806 | } |
806 | 807 | ||
808 | void read_persistent_clock(struct timespec *ts) | ||
809 | { | ||
810 | __read_persistent_clock(ts); | ||
811 | |||
812 | /* Sanitize it in case real time clock is set below EPOCH */ | ||
813 | if (ts->tv_sec < 0) { | ||
814 | ts->tv_sec = 0; | ||
815 | ts->tv_nsec = 0; | ||
816 | } | ||
817 | |||
818 | } | ||
819 | |||
807 | /* clocksource code */ | 820 | /* clocksource code */ |
808 | static cycle_t rtc_read(struct clocksource *cs) | 821 | static cycle_t rtc_read(struct clocksource *cs) |
809 | { | 822 | { |