]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
alarmtimer: Provide accessor to alarmtimer rtc device
authorJohn Stultz <john.stultz@linaro.org>
Fri, 20 Apr 2012 19:31:45 +0000 (12:31 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Apr 2012 21:56:36 +0000 (14:56 -0700)
The Android alarm interface provides a settime call that sets both
the alarmtimer RTC device and CLOCK_REALTIME to the same value.

Since there may be multiple rtc devices, provide a hook to access the
one the alarmtimer infrastructure is using.

CC: Colin Cross <ccross@android.com>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/alarmtimer.h
kernel/time/alarmtimer.c

index 975009e1cbe67b429ac5dd2459eba0f6e2e31435..96c5c249b08628309e860367e11470e9ae5bd0e9 100644 (file)
@@ -76,4 +76,7 @@ static inline int alarmtimer_callback_running(struct alarm *timer)
 }
 
 
+/* Provide way to access the rtc device being used by alarmtimers */
+struct rtc_device *alarmtimer_get_rtcdev(void);
+
 #endif
index 8a538c55fc7be401031dc5b2bf5a072dd5a03a0b..aa27d391bfc8b408ced23985bc4946067b5eba87 100644 (file)
@@ -59,7 +59,7 @@ static DEFINE_SPINLOCK(rtcdev_lock);
  * If one has not already been chosen, it checks to see if a
  * functional rtc device is available.
  */
-static struct rtc_device *alarmtimer_get_rtcdev(void)
+struct rtc_device *alarmtimer_get_rtcdev(void)
 {
        unsigned long flags;
        struct rtc_device *ret;
@@ -115,7 +115,7 @@ static void alarmtimer_rtc_interface_remove(void)
        class_interface_unregister(&alarmtimer_rtc_interface);
 }
 #else
-static inline struct rtc_device *alarmtimer_get_rtcdev(void)
+struct rtc_device *alarmtimer_get_rtcdev(void)
 {
        return NULL;
 }