diff options
Diffstat (limited to 'include/linux/rtc.h')
-rw-r--r-- | include/linux/rtc.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index c2c28975293c..6d6be09a2fe5 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
@@ -19,11 +19,28 @@ | |||
19 | extern int rtc_month_days(unsigned int month, unsigned int year); | 19 | extern int rtc_month_days(unsigned int month, unsigned int year); |
20 | extern int rtc_year_days(unsigned int day, unsigned int month, unsigned int year); | 20 | extern int rtc_year_days(unsigned int day, unsigned int month, unsigned int year); |
21 | extern int rtc_valid_tm(struct rtc_time *tm); | 21 | extern int rtc_valid_tm(struct rtc_time *tm); |
22 | extern int rtc_tm_to_time(struct rtc_time *tm, unsigned long *time); | 22 | extern time64_t rtc_tm_to_time64(struct rtc_time *tm); |
23 | extern void rtc_time_to_tm(unsigned long time, struct rtc_time *tm); | 23 | extern void rtc_time64_to_tm(time64_t time, struct rtc_time *tm); |
24 | ktime_t rtc_tm_to_ktime(struct rtc_time tm); | 24 | ktime_t rtc_tm_to_ktime(struct rtc_time tm); |
25 | struct rtc_time rtc_ktime_to_tm(ktime_t kt); | 25 | struct rtc_time rtc_ktime_to_tm(ktime_t kt); |
26 | 26 | ||
27 | /** | ||
28 | * Deprecated. Use rtc_time64_to_tm(). | ||
29 | */ | ||
30 | static inline void rtc_time_to_tm(unsigned long time, struct rtc_time *tm) | ||
31 | { | ||
32 | rtc_time64_to_tm(time, tm); | ||
33 | } | ||
34 | |||
35 | /** | ||
36 | * Deprecated. Use rtc_tm_to_time64(). | ||
37 | */ | ||
38 | static inline int rtc_tm_to_time(struct rtc_time *tm, unsigned long *time) | ||
39 | { | ||
40 | *time = rtc_tm_to_time64(tm); | ||
41 | |||
42 | return 0; | ||
43 | } | ||
27 | 44 | ||
28 | #include <linux/device.h> | 45 | #include <linux/device.h> |
29 | #include <linux/seq_file.h> | 46 | #include <linux/seq_file.h> |