diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-03 20:51:35 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-03 20:51:35 +0400 |
commit | bad6a5c08c119572c888d5df2bd7691a4da6b9e8 (patch) | |
tree | 7070d6c17659332caad8f3d8f38b51855b3f05c4 /arch/m68k/include | |
parent | 03c3fa0a3bf48dcb024263a9ea41daecacbc6efa (diff) | |
parent | 0b5f037a4dc495f9c40eed7f076fc6c23af3359b (diff) | |
download | linux-bad6a5c08c119572c888d5df2bd7691a4da6b9e8.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/kyle/rtc-parisc
* git://git.kernel.org/pub/scm/linux/kernel/git/kyle/rtc-parisc:
powerpc/ps3: Add rtc-ps3
powerpc: Hook up rtc-generic, and kill rtc-ppc
m68k: Hook up rtc-generic
parisc: rtc: Rename rtc-parisc to rtc-generic
parisc: rtc: Add missing module alias
parisc: rtc: platform_driver_probe() fixups
parisc: rtc: get_rtc_time() returns unsigned int
Diffstat (limited to 'arch/m68k/include')
-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) * 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) |