diff options
author | Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> | 2009-02-19 16:50:46 +0100 |
---|---|---|
committer | Kyle McMartin <kyle@mcmartin.ca> | 2009-04-02 01:05:31 +0000 |
commit | 2ceb3ad705aa1abe6656b038bb9f4a6b1201cc35 (patch) | |
tree | 2ba21ba2d78d98cc442958a429bd602319e650c8 /arch/m68k/include/asm/rtc.h | |
parent | 3afe6d04626f8de87b15150a30b78df492ab68ee (diff) | |
download | kernel_samsung_smdk4412-2ceb3ad705aa1abe6656b038bb9f4a6b1201cc35.zip kernel_samsung_smdk4412-2ceb3ad705aa1abe6656b038bb9f4a6b1201cc35.tar.gz kernel_samsung_smdk4412-2ceb3ad705aa1abe6656b038bb9f4a6b1201cc35.tar.bz2 |
m68k: Hook up rtc-generic
m68k has been a long time user of the generic RTC abstraction, so hook up
rtc-generic:
- Create the "rtc-generic" platform device if mach_hwclk is set,
- Add checks for mach_hwclk, in anticipation of RTC chip drivers being moved
to drivers/rtc/.
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
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 5d3e038..a4d08ea 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) |