kernel: alarm: setup the RTC immediately for poweroff alarm

Currently we setup the RTC for poweroff alarm when the system
performs shutdown. But if the phone is shut down unexpectedly
before that, the poweroff alarm can't work. So we can do that
immediately.

CR-fixed: 532743
Change-Id: Ib26a56fba8cd64efe94f2f07ee232482228429dc
Signed-off-by: Figo Wang <figow@codeaurora.org>
This commit is contained in:
Figo Wang
2014-03-19 11:00:00 +08:00
committed by Mao Jinlong
parent d9c74020a5
commit aec339ee1f
+2
View File
@@ -71,9 +71,11 @@ struct alarm_queue alarms[ANDROID_ALARM_TYPE_COUNT];
static bool suspended;
static long power_on_alarm;
static void alarm_shutdown(struct platform_device *dev);
void set_power_on_alarm(long secs)
{
power_on_alarm = secs;
alarm_shutdown(NULL);
}