diff options
Diffstat (limited to 'apps/misc.c')
-rw-r--r-- | apps/misc.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/misc.c b/apps/misc.c index f25b18cb39..5d64b538f0 100644 --- a/apps/misc.c +++ b/apps/misc.c | |||
@@ -218,12 +218,13 @@ bool clean_shutdown(void) | |||
218 | { | 218 | { |
219 | lcd_clear_display(); | 219 | lcd_clear_display(); |
220 | splash(0, true, str(LANG_SHUTTINGDOWN)); | 220 | splash(0, true, str(LANG_SHUTTINGDOWN)); |
221 | sleep(HZ); | ||
222 | mpeg_stop(); | 221 | mpeg_stop(); |
223 | ata_flush(); | 222 | if (ata_disk_is_active()) { |
224 | ata_spindown(1); | 223 | ata_flush(); |
225 | while(ata_disk_is_active()) | 224 | ata_spindown(1); |
226 | sleep(HZ/10); | 225 | while(ata_disk_is_active()) |
226 | sleep(HZ/10); | ||
227 | } | ||
227 | mp3_shutdown(); | 228 | mp3_shutdown(); |
228 | #if CONFIG_KEYPAD == ONDIO_PAD | 229 | #if CONFIG_KEYPAD == ONDIO_PAD |
229 | backlight_off(); | 230 | backlight_off(); |