Xunlei Pang 6528b88995 rtc: refine rtc_timer_do_work() to consider other set alarm failures
rtc_timer_do_work() only judges -ETIME failure of__rtc_set_alarm(), but
doesn't handle other failures like -EIO, -EBUSY, etc.

If there is a failure other than -ETIME, the next rtc_timer will stay in
the timerqueue.  Then later rtc_timers will be enqueued directly because
they have a later expires time, so the alarm irq will never be programmed.

When such failures happen, this patch will retry __rtc_set_alarm(), if
still can't program the alarm time, it will remove current rtc_timer from
timerqueue and fetch next one, thus preventing it from affecting other rtc
timers.

Signed-off-by: Xunlei Pang <pang.xunlei@linaro.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Arnd Bergmann <arnd.bergmann@linaro.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-12-10 17:41:16 -08:00
..
2014-12-08 21:19:19 -08:00
2014-11-23 14:29:44 -05:00
2014-12-09 14:48:22 -08:00
2014-12-09 17:25:00 -08:00
2014-12-09 14:48:22 -08:00
2014-12-08 20:17:49 -08:00
2014-11-25 16:18:56 +00:00
2014-12-08 20:02:54 -08:00
2014-12-08 20:02:54 -08:00
2014-12-08 20:02:54 -08:00
2014-12-08 20:02:54 -08:00
2014-12-09 14:18:35 -08:00
2014-11-02 14:45:52 -08:00
2014-12-09 14:38:28 -08:00
2014-10-21 08:17:43 -07:00
2014-12-08 20:42:41 -08:00
2014-12-04 16:57:36 +01:00
2014-12-09 14:48:22 -08:00
2014-12-09 14:57:37 -08:00
2014-12-09 13:12:47 -08:00