12345678910111213141516171819202122232425262728293031323334 |
- #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
- #include <linux/init.h>
- #include <linux/kernel.h>
- #include <linux/module.h>
- #include <linux/efi.h>
- #include <linux/platform_device.h>
- static struct platform_device rtc_efi_dev = {
- .name = "rtc-efi",
- .id = -1,
- };
- static int __init rtc_init(void)
- {
- if (efi_enabled(EFI_RUNTIME_SERVICES))
- if (platform_device_register(&rtc_efi_dev) < 0)
- pr_err("unable to register rtc device...\n");
-
- return 0;
- }
- module_init(rtc_init);
|