aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKumar Gala <galak@freescale.com>2005-10-20 11:43:33 -0500
committerPaul Mackerras <paulus@samba.org>2005-10-26 15:52:37 +1000
commitd2e615125762459fd2bb9f0c91881509a0b9c31b (patch)
tree249fc27bbf4b81f8cad1072f3ff359a7876fdd5a
parent340601043df518d6f4f82da285c60c785ac8a716 (diff)
[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: Kumar K. Gala <kumar.gala@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r--arch/powerpc/kernel/time.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index ad501d62aa6..82f2cabb4f4 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -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) {