[PATCH] powerpc: Make sure we have an RTC before trying to adjust it
authorKumar Gala <galak@freescale.com>
Thu, 20 Oct 2005 16:43:33 +0000 (11:43 -0500)
committerPaul Mackerras <paulus@samba.org>
Wed, 26 Oct 2005 05:52:37 +0000 (15:52 +1000)
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>
arch/powerpc/kernel/time.c

index ad501d62aa6edded0b415d559df0977a324108d1..82f2cabb4f471c833651e6742d4f2f6cb95e85ba 100644 (file)
@@ -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) {