]> git.baikalelectronics.ru Git - kernel.git/commit
rtc: Disable the alarm in the hardware (v2)
authorRabin Vincent <rabin.vincent@stericsson.com>
Tue, 22 Nov 2011 10:03:14 +0000 (11:03 +0100)
committerJohn Stultz <john.stultz@linaro.org>
Fri, 27 Jan 2012 03:41:42 +0000 (19:41 -0800)
commitca43f7eae5de623e8fd35b8899fe0933bf1f9f5b
treed0923396755a299e0c21066575ace82b93697429
parente53cf2b6359d017ecf478939af4480ae65640fb7
rtc: Disable the alarm in the hardware (v2)

Currently, the RTC code does not disable the alarm in the hardware.

This means that after a sequence such as the one below (the files are in the
RTC sysfs), the box will boot up after 2 minutes even though we've
asked for the alarm to be turned off.

# echo $((`cat since_epoch`)+120) > wakealarm
# echo 0 > wakealarm
# poweroff

Fix this by disabling the alarm when there are no timers to run.

The original version of this patch was reverted. This version
disables the irq directly instead of setting a disabled timer
in the future.

Cc: stable@kernel.org
Cc: John Stultz <john.stultz@linaro.org>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
[Merged in the second revision from Rabin]
Signed-off-by: John Stultz <john.stultz@linaro.org>
drivers/rtc/interface.c