rtc: Expire alarms after the time is set. (v2)
authorNeilBrown <neilb@suse.de>
Thu, 8 Dec 2011 22:39:15 +0000 (09:39 +1100)
committerGrazvydas Ignotas <notasas@gmail.com>
Sat, 2 Mar 2013 20:11:51 +0000 (22:11 +0200)
commit1c2940354415189e113ac9eb2eb10cdebbeeb6f6
tree798e6088f089f82666c098eb840c4c77f64f8bf1
parentbe069c9a1a7c76cbaa32fe0dbb5cda9bed521e3d
rtc: Expire alarms after the time is set. (v2)

If the alarm time programming in the rtc is ever in the past, it won't fire,
and any other alarm will be queued after it so they won't fire either.

So any time that the alarm might be in the past, we need to trigger
the irq handler to ensure the old alarm is cleared and the timer queue
is fully in the future.

This is done whenever the RTC clock is set.

This is the second revision of this patch, which was earlier reverted.
This version avoids the initialization problem, which is handled by
a different patch.

Tested-by: Sander Eikelenboom <linux@eikelenboom.it>
Signed-off-by: NeilBrown <neilb@suse.de>
[Remove problematic initialization change, update commit log, also
catch set_mmss case -jstultz]
Signed-off-by: John Stultz <john.stultz@linaro.org>
drivers/rtc/interface.c