summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/time.c
diff options
context:
space:
mode:
authorKumar Gala <galak@freescale.com>2005-10-20 16:43:33 (GMT)
committerPaul Mackerras <paulus@samba.org>2005-10-26 05:52:37 (GMT)
commitd2e615125762459fd2bb9f0c91881509a0b9c31b (patch)
tree249fc27bbf4b81f8cad1072f3ff359a7876fdd5a /arch/powerpc/kernel/time.c
parent340601043df518d6f4f82da285c60c785ac8a716 (diff)
downloadlinux-fsl-qoriq-d2e615125762459fd2bb9f0c91881509a0b9c31b.tar.xz
[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>
Diffstat (limited to 'arch/powerpc/kernel/time.c')
-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 ad501d6..82f2cab 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) {