diff options
author | Kumar Gala <galak@freescale.com> | 2005-10-20 12:43:33 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-10-26 01:52:37 -0400 |
commit | d2e615125762459fd2bb9f0c91881509a0b9c31b (patch) | |
tree | 249fc27bbf4b81f8cad1072f3ff359a7876fdd5a /arch/powerpc | |
parent | 340601043df518d6f4f82da285c60c785ac8a716 (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>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/time.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index ad501d62aa6e..82f2cabb4f47 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -154,7 +154,7 @@ static __inline__ void timer_check_rtc(void) | |||
154 | * We should have an rtc call that only sets the minutes and | 154 | * We should have an rtc call that only sets the minutes and |
155 | * seconds like on Intel to avoid problems with non UTC clocks. | 155 | * seconds like on Intel to avoid problems with non UTC clocks. |
156 | */ | 156 | */ |
157 | if (ntp_synced() && | 157 | if (ppc_md.set_rtc_time && ntp_synced() && |
158 | xtime.tv_sec - last_rtc_update >= 659 && | 158 | xtime.tv_sec - last_rtc_update >= 659 && |
159 | abs((xtime.tv_nsec/1000) - (1000000-1000000/HZ)) < 500000/HZ && | 159 | abs((xtime.tv_nsec/1000) - (1000000-1000000/HZ)) < 500000/HZ && |
160 | jiffies - wall_jiffies == 1) { | 160 | jiffies - wall_jiffies == 1) { |