diff options
author | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2018-07-25 09:07:09 -0400 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2018-07-26 09:08:53 -0400 |
commit | 8719d3c9188b38db462a77ecd8c7a8e25e7e8c4c (patch) | |
tree | 058a9ced72bc0bdebb4cd224a02e2646c0c089c2 | |
parent | acecb3ad8b21a519ce4ad728106d45d4e978bb56 (diff) |
rtc: simplify rtc_irq_set_state/rtc_irq_set_freq
The PIE doesn't handle tasks anymore, remove the pointer from the
interface.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-rw-r--r-- | drivers/rtc/interface.c | 4 | ||||
-rw-r--r-- | drivers/rtc/rtc-dev.c | 8 | ||||
-rw-r--r-- | include/linux/rtc.h | 6 |
3 files changed, 8 insertions, 10 deletions
diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c index ae0d67610c7b..76eb3a2957cc 100644 --- a/drivers/rtc/interface.c +++ b/drivers/rtc/interface.c | |||
@@ -746,7 +746,7 @@ static int rtc_update_hrtimer(struct rtc_device *rtc, int enabled) | |||
746 | * Note that rtc_irq_set_freq() should previously have been used to | 746 | * Note that rtc_irq_set_freq() should previously have been used to |
747 | * specify the desired frequency of periodic IRQ. | 747 | * specify the desired frequency of periodic IRQ. |
748 | */ | 748 | */ |
749 | int rtc_irq_set_state(struct rtc_device *rtc, struct rtc_task *task, int enabled) | 749 | int rtc_irq_set_state(struct rtc_device *rtc, int enabled) |
750 | { | 750 | { |
751 | int err = 0; | 751 | int err = 0; |
752 | 752 | ||
@@ -770,7 +770,7 @@ EXPORT_SYMBOL_GPL(rtc_irq_set_state); | |||
770 | * Note that rtc_irq_set_state() is used to enable or disable the | 770 | * Note that rtc_irq_set_state() is used to enable or disable the |
771 | * periodic IRQs. | 771 | * periodic IRQs. |
772 | */ | 772 | */ |
773 | int rtc_irq_set_freq(struct rtc_device *rtc, struct rtc_task *task, int freq) | 773 | int rtc_irq_set_freq(struct rtc_device *rtc, int freq) |
774 | { | 774 | { |
775 | int err = 0; | 775 | int err = 0; |
776 | 776 | ||
diff --git a/drivers/rtc/rtc-dev.c b/drivers/rtc/rtc-dev.c index efa221e8bc22..43d962a9c210 100644 --- a/drivers/rtc/rtc-dev.c +++ b/drivers/rtc/rtc-dev.c | |||
@@ -341,11 +341,11 @@ static long rtc_dev_ioctl(struct file *file, | |||
341 | return rtc_set_time(rtc, &tm); | 341 | return rtc_set_time(rtc, &tm); |
342 | 342 | ||
343 | case RTC_PIE_ON: | 343 | case RTC_PIE_ON: |
344 | err = rtc_irq_set_state(rtc, NULL, 1); | 344 | err = rtc_irq_set_state(rtc, 1); |
345 | break; | 345 | break; |
346 | 346 | ||
347 | case RTC_PIE_OFF: | 347 | case RTC_PIE_OFF: |
348 | err = rtc_irq_set_state(rtc, NULL, 0); | 348 | err = rtc_irq_set_state(rtc, 0); |
349 | break; | 349 | break; |
350 | 350 | ||
351 | case RTC_AIE_ON: | 351 | case RTC_AIE_ON: |
@@ -365,7 +365,7 @@ static long rtc_dev_ioctl(struct file *file, | |||
365 | return rtc_update_irq_enable(rtc, 0); | 365 | return rtc_update_irq_enable(rtc, 0); |
366 | 366 | ||
367 | case RTC_IRQP_SET: | 367 | case RTC_IRQP_SET: |
368 | err = rtc_irq_set_freq(rtc, NULL, arg); | 368 | err = rtc_irq_set_freq(rtc, arg); |
369 | break; | 369 | break; |
370 | 370 | ||
371 | case RTC_IRQP_READ: | 371 | case RTC_IRQP_READ: |
@@ -427,7 +427,7 @@ static int rtc_dev_release(struct inode *inode, struct file *file) | |||
427 | /* Keep ioctl until all drivers are converted */ | 427 | /* Keep ioctl until all drivers are converted */ |
428 | rtc_dev_ioctl(file, RTC_UIE_OFF, 0); | 428 | rtc_dev_ioctl(file, RTC_UIE_OFF, 0); |
429 | rtc_update_irq_enable(rtc, 0); | 429 | rtc_update_irq_enable(rtc, 0); |
430 | rtc_irq_set_state(rtc, NULL, 0); | 430 | rtc_irq_set_state(rtc, 0); |
431 | 431 | ||
432 | clear_bit_unlock(RTC_DEV_BUSY, &rtc->flags); | 432 | clear_bit_unlock(RTC_DEV_BUSY, &rtc->flags); |
433 | return 0; | 433 | return 0; |
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 8cc23fdfd4ee..bf4d375025d1 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
@@ -202,10 +202,8 @@ extern void rtc_update_irq(struct rtc_device *rtc, | |||
202 | extern struct rtc_device *rtc_class_open(const char *name); | 202 | extern struct rtc_device *rtc_class_open(const char *name); |
203 | extern void rtc_class_close(struct rtc_device *rtc); | 203 | extern void rtc_class_close(struct rtc_device *rtc); |
204 | 204 | ||
205 | extern int rtc_irq_set_state(struct rtc_device *rtc, | 205 | extern int rtc_irq_set_state(struct rtc_device *rtc, int enabled); |
206 | struct rtc_task *task, int enabled); | 206 | extern int rtc_irq_set_freq(struct rtc_device *rtc, int freq); |
207 | extern int rtc_irq_set_freq(struct rtc_device *rtc, | ||
208 | struct rtc_task *task, int freq); | ||
209 | extern int rtc_update_irq_enable(struct rtc_device *rtc, unsigned int enabled); | 207 | extern int rtc_update_irq_enable(struct rtc_device *rtc, unsigned int enabled); |
210 | extern int rtc_alarm_irq_enable(struct rtc_device *rtc, unsigned int enabled); | 208 | extern int rtc_alarm_irq_enable(struct rtc_device *rtc, unsigned int enabled); |
211 | extern int rtc_dev_update_irq_enable_emul(struct rtc_device *rtc, | 209 | extern int rtc_dev_update_irq_enable_emul(struct rtc_device *rtc, |