diff options
Diffstat (limited to 'arch/m68k/include/asm/rtc.h')
-rw-r--r-- | arch/m68k/include/asm/rtc.h | 7 |
1 files changed, 5 insertions, 2 deletions
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) | |||
36 | * RTC has RTC_DAY_OF_WEEK, we ignore it, as it is only updated | 36 | * RTC has RTC_DAY_OF_WEEK, we ignore it, as it is only updated |
37 | * by the RTC when initially set to a non-zero value. | 37 | * by the RTC when initially set to a non-zero value. |
38 | */ | 38 | */ |
39 | mach_hwclk(0, time); | 39 | if (mach_hwclk) |
40 | mach_hwclk(0, time); | ||
40 | return RTC_24H; | 41 | return RTC_24H; |
41 | } | 42 | } |
42 | 43 | ||
43 | static inline int set_rtc_time(struct rtc_time *time) | 44 | static inline int set_rtc_time(struct rtc_time *time) |
44 | { | 45 | { |
45 | return mach_hwclk(1, time); | 46 | if (mach_hwclk) |
47 | return mach_hwclk(1, time); | ||
48 | return -EINVAL; | ||
46 | } | 49 | } |
47 | 50 | ||
48 | static inline unsigned int get_rtc_ss(void) | 51 | static inline unsigned int get_rtc_ss(void) |