summaryrefslogtreecommitdiff
path: root/include/linux/rtc.h
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2018-12-18 22:11:26 +0100
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2018-12-18 22:53:29 +0100
commit9a03201170d3de1da47c1b7e2d514e0b15477881 (patch)
tree30e9415bb7fa8fc3a2bb0d81c466b51f41af2459 /include/linux/rtc.h
parentffe1c5a2d4271a0e04e2576ab0a53ac09a14e065 (diff)
rtc: enforce rtc_timer_init private_data type
All the remaining users of rtc_timers are passing the rtc_device as private data. Enforce that and rename private_data to rtc. Suggested-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'include/linux/rtc.h')
-rw-r--r--include/linux/rtc.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/include/linux/rtc.h b/include/linux/rtc.h
index 58147b057acd..c1089fe5344a 100644
--- a/include/linux/rtc.h
+++ b/include/linux/rtc.h
@@ -87,15 +87,16 @@ struct rtc_class_ops {
int (*set_offset)(struct device *, long offset);
};
+struct rtc_device;
+
struct rtc_timer {
struct timerqueue_node node;
ktime_t period;
- void (*func)(void *private_data);
- void *private_data;
+ void (*func)(struct rtc_device *rtc);
+ struct rtc_device *rtc;
int enabled;
};
-
/* flags */
#define RTC_DEV_BUSY 0
@@ -197,11 +198,12 @@ extern int rtc_dev_update_irq_enable_emul(struct rtc_device *rtc,
unsigned int enabled);
void rtc_handle_legacy_irq(struct rtc_device *rtc, int num, int mode);
-void rtc_aie_update_irq(void *private);
-void rtc_uie_update_irq(void *private);
+void rtc_aie_update_irq(struct rtc_device *rtc);
+void rtc_uie_update_irq(struct rtc_device *rtc);
enum hrtimer_restart rtc_pie_update_irq(struct hrtimer *timer);
-void rtc_timer_init(struct rtc_timer *timer, void (*f)(void *p), void *data);
+void rtc_timer_init(struct rtc_timer *timer, void (*f)(struct rtc_device *r),
+ struct rtc_device *rtc);
int rtc_timer_start(struct rtc_device *rtc, struct rtc_timer *timer,
ktime_t expires, ktime_t period);
void rtc_timer_cancel(struct rtc_device *rtc, struct rtc_timer *timer);