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.
Signed-off-by: John Stultz <john.stultz@linaro.org>
diff --git a/include/linux/alarmtimer.h b/include/linux/alarmtimer.h
index 975009e..efbf678 100644
--- a/include/linux/alarmtimer.h
+++ b/include/linux/alarmtimer.h
@@ -76,4 +76,11 @@
}
+/* Provide way to access the rtc device being used by alarmtimers */
+#ifdef CONFIG_RTC_CLASS
+struct rtc_device *alarmtimer_get_rtcdev(void);
+#else
+#define alarmtimer_get_rtcdev() (0)
+#endif
+
#endif