]> git.karo-electronics.de Git - karo-tx-linux.git/commit
rtc: Disable the alarm in the hardware
authorRabin Vincent <rabin.vincent@stericsson.com>
Tue, 22 Nov 2011 10:03:14 +0000 (11:03 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 9 Dec 2011 16:55:51 +0000 (08:55 -0800)
commit0cbc008c56f7b4a11ba6fe80e196d7ab322baabf
tree351830482d9f83484c3e674fb2d44056a7e418ac
parentbf34b36a208ecca76e41814ff8837f8b41528248
rtc: Disable the alarm in the hardware

commit c0afabd3d553c521e003779c127143ffde55a16f upstream.

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.

Cc: John Stultz <john.stultz@linaro.org>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/rtc/interface.c