rtc-efi-platform.c 843 B

1234567891011121314151617181920212223242526272829303132333435
  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. #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
  12. #include <linux/init.h>
  13. #include <linux/kernel.h>
  14. #include <linux/module.h>
  15. #include <linux/efi.h>
  16. #include <linux/platform_device.h>
  17. static struct platform_device rtc_efi_dev = {
  18. .name = "rtc-efi",
  19. .id = -1,
  20. };
  21. static int __init rtc_init(void)
  22. {
  23. if (efi_enabled(EFI_RUNTIME_SERVICES))
  24. if (platform_device_register(&rtc_efi_dev) < 0)
  25. pr_err("unable to register rtc device...\n");
  26. /* not necessarily an error */
  27. return 0;
  28. }
  29. module_init(rtc_init);