提交 d2e61512 编写于 作者: K Kumar Gala 提交者: Paul Mackerras

[PATCH] powerpc: Make sure we have an RTC before trying to adjust it

Its valid for ppc_md.set_rtc_time to be NULL.  We need to check
that its non-NULL before trying to update the RTC.
Signed-off-by: NKumar K. Gala <kumar.gala@freescale.com>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 34060104
......@@ -154,7 +154,7 @@ static __inline__ void timer_check_rtc(void)
* We should have an rtc call that only sets the minutes and
* seconds like on Intel to avoid problems with non UTC clocks.
*/
if (ntp_synced() &&
if (ppc_md.set_rtc_time && ntp_synced() &&
xtime.tv_sec - last_rtc_update >= 659 &&
abs((xtime.tv_nsec/1000) - (1000000-1000000/HZ)) < 500000/HZ &&
jiffies - wall_jiffies == 1) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册