diff options
Diffstat (limited to 'firmware/powermgmt.c')
-rw-r--r-- | firmware/powermgmt.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c index b31dc81624..379b91ca13 100644 --- a/firmware/powermgmt.c +++ b/firmware/powermgmt.c | |||
@@ -889,9 +889,9 @@ void set_keypress_restarts_sleep_timer(bool enable) | |||
889 | sleeptimer_key_restarts = enable; | 889 | sleeptimer_key_restarts = enable; |
890 | } | 890 | } |
891 | 891 | ||
892 | #ifndef BOOTLOADER | ||
892 | static void handle_sleep_timer(void) | 893 | static void handle_sleep_timer(void) |
893 | { | 894 | { |
894 | #ifndef BOOTLOADER | ||
895 | if (!sleeptimer_active) | 895 | if (!sleeptimer_active) |
896 | return; | 896 | return; |
897 | 897 | ||
@@ -912,8 +912,8 @@ static void handle_sleep_timer(void) | |||
912 | sys_poweroff(); | 912 | sys_poweroff(); |
913 | } | 913 | } |
914 | } | 914 | } |
915 | #endif /* BOOTLOADER */ | ||
916 | } | 915 | } |
916 | #endif /* BOOTLOADER */ | ||
917 | 917 | ||
918 | /* | 918 | /* |
919 | * We shut off in the following cases: | 919 | * We shut off in the following cases: |
@@ -929,6 +929,7 @@ static void handle_sleep_timer(void) | |||
929 | */ | 929 | */ |
930 | void handle_auto_poweroff(void) | 930 | void handle_auto_poweroff(void) |
931 | { | 931 | { |
932 | #ifndef BOOTLOADER | ||
932 | long timeout = poweroff_timeout*60*HZ; | 933 | long timeout = poweroff_timeout*60*HZ; |
933 | int audio_stat = audio_status(); | 934 | int audio_stat = audio_status(); |
934 | long tick = current_tick; | 935 | long tick = current_tick; |
@@ -968,4 +969,5 @@ void handle_auto_poweroff(void) | |||
968 | } | 969 | } |
969 | } else | 970 | } else |
970 | handle_sleep_timer(); | 971 | handle_sleep_timer(); |
972 | #endif | ||
971 | } | 973 | } |