summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authordann frazier <dannf@dannf.org>2009-03-31 15:24:48 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-01 08:59:24 -0700
commit5e3fd9e5810f141c9c70c36992d4ed72b3aa1fed (patch)
tree002025896b9ec87f14a98a82a8a80055e7b2daae /arch
parent78d89ef40c2ff7265df077e20c4d76be7d415204 (diff)
downloadop-kernel-dev-5e3fd9e5810f141c9c70c36992d4ed72b3aa1fed.zip
op-kernel-dev-5e3fd9e5810f141c9c70c36992d4ed72b3aa1fed.tar.gz
rtc: add platform driver for EFI
Munge Stephane Eranian's efirtc.c code into an rtc platform driver [akpm@linux-foundation.org: use is_leap_year()] Signed-off-by: dann frazier <dannf@hp.com> Cc: Alessandro Zummo <alessandro.zummo@towertech.it> Cc: stephane eranian <eranian@googlemail.com> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/ia64/kernel/time.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c
index f0ebb34..d6747ba 100644
--- a/arch/ia64/kernel/time.c
+++ b/arch/ia64/kernel/time.c
@@ -20,6 +20,7 @@
#include <linux/efi.h>
#include <linux/timex.h>
#include <linux/clocksource.h>
+#include <linux/platform_device.h>
#include <asm/machvec.h>
#include <asm/delay.h>
@@ -405,6 +406,21 @@ static struct irqaction timer_irqaction = {
.name = "timer"
};
+static struct platform_device rtc_efi_dev = {
+ .name = "rtc-efi",
+ .id = -1,
+};
+
+static int __init rtc_init(void)
+{
+ if (platform_device_register(&rtc_efi_dev) < 0)
+ printk(KERN_ERR "unable to register rtc device...\n");
+
+ /* not necessarily an error */
+ return 0;
+}
+module_init(rtc_init);
+
void __init
time_init (void)
{
OpenPOWER on IntegriCloud