aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2011-01-20 18:26:12 -0500
committerThomas Gleixner <tglx@linutronix.de>2011-01-21 11:38:19 -0500
commitaa0be0f4659f91f31e45adc422b1788cb36ffddc (patch)
tree02eed33d672f36e41e735c5060acb9d2446c23af /include
parentdb6b175fa6ad1408cbb2fb62949a6d55cfece03e (diff)
RTC: Propagate error handling via rtc_timer_enqueue properly
In cases where RTC hardware does not support alarms, the virtualized RTC interfaces did not have a way to propagate the error up to userland. This patch extends rtc_timer_enqueue so it catches errors from the hardware and returns them upwards to the virtualized interfaces. To simplify error handling, it also internalizes the management of the timer->enabled bit into rtc_timer_enqueue and rtc_timer_remove. Also makes rtc_timer_enqueue and rtc_timer_remove static. Reported-by: David Daney <ddaney@caviumnetworks.com> Reported-by: Andreas Schwab <schwab@linux-m68k.org> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Diagnosed-by: David Daney <ddaney@caviumnetworks.com> Tested-by: David Daney <ddaney@caviumnetworks.com> Signed-off-by: John Stultz <john.stultz@linaro.org> LKML-Reference: <1295565973-14358-1-git-send-email-john.stultz@linaro.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/rtc.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/include/linux/rtc.h b/include/linux/rtc.h
index ea760698e6fe..a0b639f8e805 100644
--- a/include/linux/rtc.h
+++ b/include/linux/rtc.h
@@ -244,8 +244,6 @@ int rtc_register(rtc_task_t *task);
244int rtc_unregister(rtc_task_t *task); 244int rtc_unregister(rtc_task_t *task);
245int rtc_control(rtc_task_t *t, unsigned int cmd, unsigned long arg); 245int rtc_control(rtc_task_t *t, unsigned int cmd, unsigned long arg);
246 246
247void rtc_timer_enqueue(struct rtc_device *rtc, struct rtc_timer *timer);
248void rtc_timer_remove(struct rtc_device *rtc, struct rtc_timer *timer);
249void rtc_timer_init(struct rtc_timer *timer, void (*f)(void* p), void* data); 247void rtc_timer_init(struct rtc_timer *timer, void (*f)(void* p), void* data);
250int rtc_timer_start(struct rtc_device *rtc, struct rtc_timer* timer, 248int rtc_timer_start(struct rtc_device *rtc, struct rtc_timer* timer,
251 ktime_t expires, ktime_t period); 249 ktime_t expires, ktime_t period);