X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=arch%2Fm68k%2Finclude%2Fasm%2Frtc.h;h=a4d08ea122ee3f310cd3f7caaf3205aa6b524fc1;hp=5d3e038598441c58b459c37e30aa1e6b0a09ccc5;hb=3c1795cc4bd9d57281bebc314315b8afa217b9c7;hpb=6b3bf2049180c4d4d6f4432f9148621410c179a9 diff --git a/arch/m68k/include/asm/rtc.h b/arch/m68k/include/asm/rtc.h index 5d3e03859844..a4d08ea122ee 100644 --- a/arch/m68k/include/asm/rtc.h +++ b/arch/m68k/include/asm/rtc.h @@ -36,13 +36,16 @@ static inline unsigned int get_rtc_time(struct rtc_time *time) * RTC has RTC_DAY_OF_WEEK, we ignore it, as it is only updated * by the RTC when initially set to a non-zero value. */ - mach_hwclk(0, time); + if (mach_hwclk) + mach_hwclk(0, time); return RTC_24H; } static inline int set_rtc_time(struct rtc_time *time) { - return mach_hwclk(1, time); + if (mach_hwclk) + return mach_hwclk(1, time); + return -EINVAL; } static inline unsigned int get_rtc_ss(void)