diff mbox

[RFC,13/14] Convert sh to read/update_persistent_clock

Message ID 1261541703.3508.75.camel@localhost.localdomain (mailing list archive)
State RFC
Headers show

Commit Message

John Stultz Dec. 23, 2009, 4:15 a.m. UTC
None
diff mbox

Patch

Index: gettimeoffset/arch/sh/kernel/time.c
===================================================================
--- gettimeoffset.orig/arch/sh/kernel/time.c	2009-12-22 18:50:55.000000000 -0800
+++ gettimeoffset/arch/sh/kernel/time.c	2009-12-22 18:51:12.000000000 -0800
@@ -39,12 +39,12 @@  static int null_rtc_set_time(const time_
 void (*rtc_sh_get_time)(struct timespec *) = null_rtc_get_time;
 int (*rtc_sh_set_time)(const time_t) = null_rtc_set_time;
 
-#ifdef CONFIG_GENERIC_CMOS_UPDATE
 void read_persistent_clock(struct timespec *ts)
 {
 	rtc_sh_get_time(ts);
 }
 
+#ifdef CONFIG_GENERIC_CMOS_UPDATE
 int update_persistent_clock(struct timespec now)
 {
 	return rtc_sh_set_time(now.tv_sec);
@@ -113,9 +113,5 @@  void __init time_init(void)
 	hwblk_init();
 	clk_init();
 
-	rtc_sh_get_time(&xtime);
-	set_normalized_timespec(&wall_to_monotonic,
-				-xtime.tv_sec, -xtime.tv_nsec);
-
 	late_time_init = sh_late_time_init;
 }