diff options
| author | Jiri Kosina <jkosina@suse.cz> | 2014-11-20 08:42:02 -0500 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.cz> | 2014-11-20 08:42:02 -0500 |
| commit | a02001086bbfb4da35d1228bebc2f1b442db455f (patch) | |
| tree | 62ab47936cef06fd08657ca5b6cd1df98c19be57 /drivers/rtc/rtc-efi-platform.c | |
| parent | eff264efeeb0898408e8c9df72d8a32621035bed (diff) | |
| parent | fc14f9c1272f62c3e8d01300f52467c0d9af50f9 (diff) | |
Merge Linus' tree to be be to apply submitted patches to newer code than
current trivial.git base
Diffstat (limited to 'drivers/rtc/rtc-efi-platform.c')
| -rw-r--r-- | drivers/rtc/rtc-efi-platform.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-efi-platform.c b/drivers/rtc/rtc-efi-platform.c new file mode 100644 index 000000000000..b40fbe332af4 --- /dev/null +++ b/drivers/rtc/rtc-efi-platform.c | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | /* | ||
| 2 | * Moved from arch/ia64/kernel/time.c | ||
| 3 | * | ||
| 4 | * Copyright (C) 1998-2003 Hewlett-Packard Co | ||
| 5 | * Stephane Eranian <eranian@hpl.hp.com> | ||
| 6 | * David Mosberger <davidm@hpl.hp.com> | ||
| 7 | * Copyright (C) 1999 Don Dugger <don.dugger@intel.com> | ||
| 8 | * Copyright (C) 1999-2000 VA Linux Systems | ||
| 9 | * Copyright (C) 1999-2000 Walt Drummond <drummond@valinux.com> | ||
| 10 | */ | ||
| 11 | #include <linux/init.h> | ||
| 12 | #include <linux/kernel.h> | ||
| 13 | #include <linux/module.h> | ||
| 14 | #include <linux/efi.h> | ||
| 15 | #include <linux/platform_device.h> | ||
| 16 | |||
| 17 | static struct platform_device rtc_efi_dev = { | ||
| 18 | .name = "rtc-efi", | ||
| 19 | .id = -1, | ||
| 20 | }; | ||
| 21 | |||
| 22 | static int __init rtc_init(void) | ||
| 23 | { | ||
| 24 | if (efi_enabled(EFI_RUNTIME_SERVICES)) | ||
| 25 | if (platform_device_register(&rtc_efi_dev) < 0) | ||
| 26 | pr_err("unable to register rtc device...\n"); | ||
| 27 | |||
| 28 | /* not necessarily an error */ | ||
| 29 | return 0; | ||
| 30 | } | ||
| 31 | module_init(rtc_init); | ||
