rtc: remove rtc_irq_register/rtc_irq_unregister
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Wed, 25 Jul 2018 12:34:29 +0000 (14:34 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 26 Jul 2018 13:08:50 +0000 (15:08 +0200)
The rtc_irq_* interface is not used from outside the RTC subsytem since
2016.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/interface.c
include/linux/rtc.h

index 6d4012dd69221a1ebc4b72866824be8a95f29468..2b1b9a0b9f8a870950d79464b297b10f290ba50c 100644 (file)
@@ -719,39 +719,6 @@ void rtc_class_close(struct rtc_device *rtc)
 }
 EXPORT_SYMBOL_GPL(rtc_class_close);
 
-int rtc_irq_register(struct rtc_device *rtc, struct rtc_task *task)
-{
-       int retval = -EBUSY;
-
-       if (task == NULL || task->func == NULL)
-               return -EINVAL;
-
-       /* Cannot register while the char dev is in use */
-       if (test_and_set_bit_lock(RTC_DEV_BUSY, &rtc->flags))
-               return -EBUSY;
-
-       spin_lock_irq(&rtc->irq_task_lock);
-       if (rtc->irq_task == NULL) {
-               rtc->irq_task = task;
-               retval = 0;
-       }
-       spin_unlock_irq(&rtc->irq_task_lock);
-
-       clear_bit_unlock(RTC_DEV_BUSY, &rtc->flags);
-
-       return retval;
-}
-EXPORT_SYMBOL_GPL(rtc_irq_register);
-
-void rtc_irq_unregister(struct rtc_device *rtc, struct rtc_task *task)
-{
-       spin_lock_irq(&rtc->irq_task_lock);
-       if (rtc->irq_task == task)
-               rtc->irq_task = NULL;
-       spin_unlock_irq(&rtc->irq_task_lock);
-}
-EXPORT_SYMBOL_GPL(rtc_irq_unregister);
-
 static int rtc_update_hrtimer(struct rtc_device *rtc, int enabled)
 {
        /*
index 6268208760e9587acac1114a4ce071e4bbacb160..f868d6b619abd8f587f85ae45a33d9905738aefe 100644 (file)
@@ -204,10 +204,6 @@ extern void rtc_update_irq(struct rtc_device *rtc,
 extern struct rtc_device *rtc_class_open(const char *name);
 extern void rtc_class_close(struct rtc_device *rtc);
 
-extern int rtc_irq_register(struct rtc_device *rtc,
-                               struct rtc_task *task);
-extern void rtc_irq_unregister(struct rtc_device *rtc,
-                               struct rtc_task *task);
 extern int rtc_irq_set_state(struct rtc_device *rtc,
                                struct rtc_task *task, int enabled);
 extern int rtc_irq_set_freq(struct rtc_device *rtc,