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>
This commit is contained in:
committed by
Linus Torvalds
parent
78d89ef40c
commit
5e3fd9e581
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user