diff options
Diffstat (limited to 'include/linux/rtc.h')
-rw-r--r-- | include/linux/rtc.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index c8bb4a2b48c3..c1089fe5344a 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
@@ -87,15 +87,16 @@ struct rtc_class_ops { | |||
87 | int (*set_offset)(struct device *, long offset); | 87 | int (*set_offset)(struct device *, long offset); |
88 | }; | 88 | }; |
89 | 89 | ||
90 | struct rtc_device; | ||
91 | |||
90 | struct rtc_timer { | 92 | struct rtc_timer { |
91 | struct timerqueue_node node; | 93 | struct timerqueue_node node; |
92 | ktime_t period; | 94 | ktime_t period; |
93 | void (*func)(void *private_data); | 95 | void (*func)(struct rtc_device *rtc); |
94 | void *private_data; | 96 | struct rtc_device *rtc; |
95 | int enabled; | 97 | int enabled; |
96 | }; | 98 | }; |
97 | 99 | ||
98 | |||
99 | /* flags */ | 100 | /* flags */ |
100 | #define RTC_DEV_BUSY 0 | 101 | #define RTC_DEV_BUSY 0 |
101 | 102 | ||
@@ -138,7 +139,6 @@ struct rtc_device { | |||
138 | 139 | ||
139 | bool registered; | 140 | bool registered; |
140 | 141 | ||
141 | struct nvmem_device *nvmem; | ||
142 | /* Old ABI support */ | 142 | /* Old ABI support */ |
143 | bool nvram_old_abi; | 143 | bool nvram_old_abi; |
144 | struct bin_attribute *nvram; | 144 | struct bin_attribute *nvram; |
@@ -173,8 +173,6 @@ extern struct rtc_device *devm_rtc_device_register(struct device *dev, | |||
173 | struct module *owner); | 173 | struct module *owner); |
174 | struct rtc_device *devm_rtc_allocate_device(struct device *dev); | 174 | struct rtc_device *devm_rtc_allocate_device(struct device *dev); |
175 | int __rtc_register_device(struct module *owner, struct rtc_device *rtc); | 175 | int __rtc_register_device(struct module *owner, struct rtc_device *rtc); |
176 | extern void devm_rtc_device_unregister(struct device *dev, | ||
177 | struct rtc_device *rtc); | ||
178 | 176 | ||
179 | extern int rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm); | 177 | extern int rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm); |
180 | extern int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm); | 178 | extern int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm); |
@@ -200,11 +198,12 @@ extern int rtc_dev_update_irq_enable_emul(struct rtc_device *rtc, | |||
200 | unsigned int enabled); | 198 | unsigned int enabled); |
201 | 199 | ||
202 | void rtc_handle_legacy_irq(struct rtc_device *rtc, int num, int mode); | 200 | void rtc_handle_legacy_irq(struct rtc_device *rtc, int num, int mode); |
203 | void rtc_aie_update_irq(void *private); | 201 | void rtc_aie_update_irq(struct rtc_device *rtc); |
204 | void rtc_uie_update_irq(void *private); | 202 | void rtc_uie_update_irq(struct rtc_device *rtc); |
205 | enum hrtimer_restart rtc_pie_update_irq(struct hrtimer *timer); | 203 | enum hrtimer_restart rtc_pie_update_irq(struct hrtimer *timer); |
206 | 204 | ||
207 | void rtc_timer_init(struct rtc_timer *timer, void (*f)(void *p), void *data); | 205 | void rtc_timer_init(struct rtc_timer *timer, void (*f)(struct rtc_device *r), |
206 | struct rtc_device *rtc); | ||
208 | int rtc_timer_start(struct rtc_device *rtc, struct rtc_timer *timer, | 207 | int rtc_timer_start(struct rtc_device *rtc, struct rtc_timer *timer, |
209 | ktime_t expires, ktime_t period); | 208 | ktime_t expires, ktime_t period); |
210 | void rtc_timer_cancel(struct rtc_device *rtc, struct rtc_timer *timer); | 209 | void rtc_timer_cancel(struct rtc_device *rtc, struct rtc_timer *timer); |