aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/time.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-08-28 20:34:31 -0400
committerDavid S. Miller <davem@davemloft.net>2008-08-29 17:16:46 -0400
commita0b31b578f9ab34826703762113f9d42f3ae9819 (patch)
treed481fa8184ccb200c961a82c64ac2c972eb4cde5 /arch/sparc64/kernel/time.c
parent90de9dea3bfb80d0db9e6d1ff26f7ea7b2f1f0f5 (diff)
sparc64: Check for RTC class device in update_persistent_clock().
As we convert the various by-hand sparc64 RTC drivers to use the generic RTC framework and drivers, we need to keep the NTP set_rtc_mmss() support via update_persistent_clock() working. In the end, after all the RTC device cases are converted, this local set_rtc_mmss() function will be deleted. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/time.c')
-rw-r--r--arch/sparc64/kernel/time.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c
index cc16fdcf98af..184321b88a68 100644
--- a/arch/sparc64/kernel/time.c
+++ b/arch/sparc64/kernel/time.c
@@ -405,6 +405,11 @@ static unsigned long timer_ticks_per_nsec_quotient __read_mostly;
405 405
406int update_persistent_clock(struct timespec now) 406int update_persistent_clock(struct timespec now)
407{ 407{
408 struct rtc_device *rtc = rtc_class_open("rtc0");
409
410 if (rtc)
411 return rtc_set_mmss(rtc, now.tv_sec);
412
408 return set_rtc_mmss(now.tv_sec); 413 return set_rtc_mmss(now.tv_sec);
409} 414}
410 415