]> git.karo-electronics.de Git - karo-tx-linux.git/commit
RTC: Propagate error handling via rtc_timer_enqueue properly
authorJohn Stultz <john.stultz@linaro.org>
Thu, 20 Jan 2011 23:26:12 +0000 (15:26 -0800)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 21 Jan 2011 16:38:19 +0000 (17:38 +0100)
commitaa0be0f4659f91f31e45adc422b1788cb36ffddc
tree02eed33d672f36e41e735c5060acb9d2446c23af
parentdb6b175fa6ad1408cbb2fb62949a6d55cfece03e
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>
drivers/rtc/interface.c
include/linux/rtc.h