diff options
Diffstat (limited to 'apps/settings.c')
-rw-r--r-- | apps/settings.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/settings.c b/apps/settings.c index ec96cc760b..08e6376694 100644 --- a/apps/settings.c +++ b/apps/settings.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include "talk.h" | 38 | #include "talk.h" |
39 | #include "string.h" | 39 | #include "string.h" |
40 | #include "ata.h" | 40 | #include "ata.h" |
41 | #include "ata_idle_notify.h" | ||
41 | #include "fat.h" | 42 | #include "fat.h" |
42 | #include "power.h" | 43 | #include "power.h" |
43 | #include "powermgmt.h" | 44 | #include "powermgmt.h" |
@@ -802,6 +803,11 @@ static void init_config_buffer( void ) | |||
802 | config_block[3] = CONFIG_BLOCK_VERSION; | 803 | config_block[3] = CONFIG_BLOCK_VERSION; |
803 | } | 804 | } |
804 | 805 | ||
806 | bool flush_config_block_callback(void) | ||
807 | { | ||
808 | ata_write_sectors(IF_MV2(0,) config_sector, 1, config_block); | ||
809 | return true; | ||
810 | } | ||
805 | /* | 811 | /* |
806 | * save the config block buffer to disk or RTC RAM | 812 | * save the config block buffer to disk or RTC RAM |
807 | */ | 813 | */ |
@@ -833,7 +839,7 @@ static int save_config_buffer( void ) | |||
833 | #endif | 839 | #endif |
834 | 840 | ||
835 | if (config_sector != 0) | 841 | if (config_sector != 0) |
836 | ata_delayed_write( config_sector, config_block); | 842 | register_ata_idle_func(flush_config_block_callback); |
837 | else | 843 | else |
838 | return -1; | 844 | return -1; |
839 | 845 | ||