Kyle Swenson | 8d8f654 | 2021-03-15 11:02:55 -0600 | [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 | */ |
| 11 | |
| 12 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
| 13 | |
| 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); |