]> git.baikalelectronics.ru Git - kernel.git/commit
rtc: Expire alarms after the time is set.
authorNeilBrown <neilb@suse.de>
Thu, 8 Dec 2011 22:39:15 +0000 (09:39 +1100)
committerJohn Stultz <john.stultz@linaro.org>
Tue, 13 Dec 2011 20:26:11 +0000 (12:26 -0800)
commit7db6db0e580d2b87abb39c1b3cdae13d27d714ec
tree0782370c8c04c182e67b26414e3d4180616db94b
parentae29589c0ec816bfaeb27d14903d090b78c802aa
rtc: Expire alarms after the time is set.

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 can happen:
 - when we first initialise the alarm
 - when we set the time in the rtc.

so follow both of these by scheduling the timer work function.

CC: stable@kernel.org
Signed-off-by: NeilBrown <neilb@suse.de>
[Also catch set_mmss case -jstultz]
Signed-off-by: John Stultz <john.stultz@linaro.org>
drivers/rtc/interface.c