From: Kumar Gala Date: Thu, 20 Oct 2005 16:43:33 +0000 (-0500) Subject: [PATCH] powerpc: Make sure we have an RTC before trying to adjust it X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d2e615125762459fd2bb9f0c91881509a0b9c31b;p=mv-sheeva.git [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 Signed-off-by: Paul Mackerras --- 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) {