rtc-core.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #ifdef CONFIG_RTC_INTF_DEV
  2. extern void __init rtc_dev_init(void);
  3. extern void __exit rtc_dev_exit(void);
  4. extern void rtc_dev_prepare(struct rtc_device *rtc);
  5. extern void rtc_dev_add_device(struct rtc_device *rtc);
  6. extern void rtc_dev_del_device(struct rtc_device *rtc);
  7. #else
  8. static inline void rtc_dev_init(void)
  9. {
  10. }
  11. static inline void rtc_dev_exit(void)
  12. {
  13. }
  14. static inline void rtc_dev_prepare(struct rtc_device *rtc)
  15. {
  16. }
  17. static inline void rtc_dev_add_device(struct rtc_device *rtc)
  18. {
  19. }
  20. static inline void rtc_dev_del_device(struct rtc_device *rtc)
  21. {
  22. }
  23. #endif
  24. #ifdef CONFIG_RTC_INTF_PROC
  25. extern void rtc_proc_add_device(struct rtc_device *rtc);
  26. extern void rtc_proc_del_device(struct rtc_device *rtc);
  27. #else
  28. static inline void rtc_proc_add_device(struct rtc_device *rtc)
  29. {
  30. }
  31. static inline void rtc_proc_del_device(struct rtc_device *rtc)
  32. {
  33. }
  34. #endif
  35. #ifdef CONFIG_RTC_INTF_SYSFS
  36. const struct attribute_group **rtc_get_dev_attribute_groups(void);
  37. #else
  38. static inline const struct attribute_group **rtc_get_dev_attribute_groups(void)
  39. {
  40. return NULL;
  41. }
  42. #endif