Commit a0b31b57 authored by David S. Miller's avatar David S. Miller

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: default avatarDavid S. Miller <davem@davemloft.net>
parent 90de9dea
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment