Mark Salter | da167ad | 2014-08-08 14:20:14 -0700 | [diff] [blame] | 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 | */ |
Joe Perches | a737e83 | 2015-04-16 12:46:14 -0700 | [diff] [blame] | 11 | |
| 12 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
| 13 | |
Mark Salter | da167ad | 2014-08-08 14:20:14 -0700 | [diff] [blame] | 14 | #include <linux/init.h> |
| 15 | #include <linux/kernel.h> |
| 16 | #include <linux/module.h> |
| 17 | #include <linux/efi.h> |
| 18 | #include <linux/platform_device.h> |
| 19 | |
| 20 | static struct platform_device rtc_efi_dev = { |
| 21 | .name = "rtc-efi", |
| 22 | .id = -1, |
| 23 | }; |
| 24 | |
| 25 | static int __init rtc_init(void) |
| 26 | { |
| 27 | if (efi_enabled(EFI_RUNTIME_SERVICES)) |
| 28 | if (platform_device_register(&rtc_efi_dev) < 0) |
| 29 | pr_err("unable to register rtc device...\n"); |
| 30 | |
| 31 | /* not necessarily an error */ |
| 32 | return 0; |
| 33 | } |
| 34 | module_init(rtc_init); |