summaryrefslogtreecommitdiff
path: root/firmware/powermgmt.c
diff options
context:
space:
mode:
authorMichael Sparmann <theseven@rockbox.org>2009-10-09 20:36:09 +0000
committerMichael Sparmann <theseven@rockbox.org>2009-10-09 20:36:09 +0000
commitf0a96580ae84cdfbb09db568f296491c699b6a4b (patch)
tree73d71563c1ab314f322e0fe10fc80c3b7f698ab7 /firmware/powermgmt.c
parent8e3e5e7a59f741c16eafc5ff0672af2eb1404835 (diff)
downloadrockbox-f0a96580ae84cdfbb09db568f296491c699b6a4b.tar.gz
rockbox-f0a96580ae84cdfbb09db568f296491c699b6a4b.zip
Core changes to allow storage drivers to do cleanup on shutdown, and iPod Nano 2G shutdown code rework (FS#10668)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23057 a1c6a512-1295-4272-9138-f99709370657
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 6ec0307ae5..e756bac3c2 100644
--- a/firmware/powermgmt.c
+++ b/firmware/powermgmt.c
@@ -749,6 +749,14 @@ void shutdown_hw(void)
749#ifdef HAVE_LCD_BITMAP 749#ifdef HAVE_LCD_BITMAP
750 glyph_cache_save(); 750 glyph_cache_save();
751#endif 751#endif
752
753/* Commit pending writes if needed. Even though we don't do write caching,
754 things like flash translation layers may need this to commit scattered
755 pages to there final locations. So far only used for iPod Nano 2G. */
756#ifdef HAVE_STORAGE_FLUSH
757 storage_flush();
758#endif
759
752 if (storage_disk_is_active()) 760 if (storage_disk_is_active())
753 storage_spindown(1); 761 storage_spindown(1);
754 } 762 }