Skip to content

Commit

Permalink
sparc64: Check for RTC class device in update_persistent_clock().
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David S. Miller committed Aug 29, 2008
1 parent 90de9de commit a0b31b5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arch/sparc64/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit a0b31b5

Please sign in to comment.