diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-04-28 23:12:10 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-04-28 23:12:10 +0900 |
commit | 4278600644dee621bd50d7498e244b135612e0f6 (patch) | |
tree | f99805f6e22920f3e0d24ae512ffe89e2c3ea184 /arch/sh | |
parent | 8e0b842948156e3463879caed12b4ce51bed772e (diff) | |
download | blackbird-op-linux-4278600644dee621bd50d7498e244b135612e0f6.tar.gz blackbird-op-linux-4278600644dee621bd50d7498e244b135612e0f6.zip |
sh: register the rtc-generic platform device properly.
The device registration was accidentally omitted, add it back in. Do some
basic device probing as well, so this doesn't show up for platforms that
tie in to the RTC interface properly.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/kernel/time_32.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/arch/sh/kernel/time_32.c b/arch/sh/kernel/time_32.c index a2458bfdda26..457332116e17 100644 --- a/arch/sh/kernel/time_32.c +++ b/arch/sh/kernel/time_32.c @@ -3,7 +3,7 @@ * * Copyright (C) 1999 Tetsuya Okada & Niibe Yutaka * Copyright (C) 2000 Philipp Rumpf <prumpf@tux.org> - * Copyright (C) 2002 - 2008 Paul Mundt + * Copyright (C) 2002 - 2009 Paul Mundt * Copyright (C) 2002 M. R. Brown <mrbrown@linux-sh.org> * * Some code taken from i386 version. @@ -68,6 +68,21 @@ int set_rtc_time(struct rtc_time *tm) } EXPORT_SYMBOL(set_rtc_time); +static int __init rtc_generic_init(void) +{ + struct platform_device *pdev; + + if (rtc_sh_get_time == null_rtc_get_time) + 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_generic_init); + #ifndef CONFIG_GENERIC_TIME void do_gettimeofday(struct timeval *tv) { |