summaryrefslogtreecommitdiff
path: root/firmware/powermgmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/powermgmt.c')
-rw-r--r--firmware/powermgmt.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c
index 6ec0307..e756bac 100644
--- a/firmware/powermgmt.c
+++ b/firmware/powermgmt.c
@@ -749,6 +749,14 @@ void shutdown_hw(void)
#ifdef HAVE_LCD_BITMAP
glyph_cache_save();
#endif
+
+/* Commit pending writes if needed. Even though we don't do write caching,
+ things like flash translation layers may need this to commit scattered
+ pages to there final locations. So far only used for iPod Nano 2G. */
+#ifdef HAVE_STORAGE_FLUSH
+ storage_flush();
+#endif
+
if (storage_disk_is_active())
storage_spindown(1);
}