Commit 57c498fa authored by John Stultz's avatar John Stultz Committed by Greg Kroah-Hartman

alarmtimer: Provide accessor to alarmtimer rtc device

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: default avatarJohn Stultz <john.stultz@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e2d8ccef
...@@ -76,4 +76,7 @@ static inline int alarmtimer_callback_running(struct alarm *timer) ...@@ -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 #endif
...@@ -59,7 +59,7 @@ static DEFINE_SPINLOCK(rtcdev_lock); ...@@ -59,7 +59,7 @@ static DEFINE_SPINLOCK(rtcdev_lock);
* If one has not already been chosen, it checks to see if a * If one has not already been chosen, it checks to see if a
* functional rtc device is available. * functional rtc device is available.
*/ */
static struct rtc_device *alarmtimer_get_rtcdev(void) struct rtc_device *alarmtimer_get_rtcdev(void)
{ {
unsigned long flags; unsigned long flags;
struct rtc_device *ret; struct rtc_device *ret;
...@@ -115,7 +115,7 @@ static void alarmtimer_rtc_interface_remove(void) ...@@ -115,7 +115,7 @@ static void alarmtimer_rtc_interface_remove(void)
class_interface_unregister(&alarmtimer_rtc_interface); class_interface_unregister(&alarmtimer_rtc_interface);
} }
#else #else
static inline struct rtc_device *alarmtimer_get_rtcdev(void) struct rtc_device *alarmtimer_get_rtcdev(void)
{ {
return NULL; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment