diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-03 18:51:35 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-03 18:51:35 +0200 |
commit | bad6a5c08c119572c888d5df2bd7691a4da6b9e8 (patch) | |
tree | 7070d6c17659332caad8f3d8f38b51855b3f05c4 /arch/m68k/kernel | |
parent | Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jac... (diff) | |
parent | powerpc/ps3: Add rtc-ps3 (diff) | |
download | linux-bad6a5c08c119572c888d5df2bd7691a4da6b9e8.tar.xz linux-bad6a5c08c119572c888d5df2bd7691a4da6b9e8.zip |
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/kernel')
-rw-r--r-- | arch/m68k/kernel/time.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/m68k/kernel/time.c b/arch/m68k/kernel/time.c index 7db41594d7b6..54d980795fc4 100644 --- a/arch/m68k/kernel/time.c +++ b/arch/m68k/kernel/time.c @@ -18,6 +18,7 @@ #include <linux/string.h> #include <linux/mm.h> #include <linux/rtc.h> +#include <linux/platform_device.h> #include <asm/machdep.h> #include <asm/io.h> @@ -159,3 +160,20 @@ int do_settimeofday(struct timespec *tv) } EXPORT_SYMBOL(do_settimeofday); + + +static int __init rtc_init(void) +{ + struct platform_device *pdev; + + if (!mach_hwclk) + return -ENODEV; + + pdev = platform_device_register_simple("rtc-generic", -1, NULL, 0); + if (IS_ERR(pdev)) + return PTR_ERR(pdev); + + return 0; +} + +module_init(rtc_init); |