[PATCH 3/12]: sparc64: Check for RTC class device in update_persistent_clock(). | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
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@xxxxxxxxxxxxx>
---
arch/sparc64/kernel/time.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c
index cc16fdc..184321b 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;
int update_persistent_clock(struct timespec now)
{
+ struct rtc_device *rtc = rtc_class_open("rtc0");
+
+ if (rtc)
+ return rtc_set_mmss(rtc, now.tv_sec);
+
return set_rtc_mmss(now.tv_sec);
}
--
1.5.6.5.GIT
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux MIPS Home] [Kernel list] [DCCP] [Linux ARM list] [Linux] [Photo] [Yosemite News] [MIPS Architecture] [Linux SCSI] [Linux x86_64] [Linux Hams] [Site Home]
![]() |