From 4c38e0b5c11ad566ddbd6a7961ee37cc624850ea Mon Sep 17 00:00:00 2001 From: Byungsoo Kim Date: Mon, 10 Jun 2013 17:13:21 +0900 Subject: [PATCH] modify lazy mounting of mmc card for booting speed Change-Id: Ia8e0f3ce18a9dbd763fa399747f3464789471b92 Signed-off-by: Byungsoo Kim --- src/mmc/mmc-handler.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/mmc/mmc-handler.c b/src/mmc/mmc-handler.c index 4d3aef3..a6db707 100644 --- a/src/mmc/mmc-handler.c +++ b/src/mmc/mmc-handler.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -789,11 +788,27 @@ int register_mmc_handler(const char *name, const struct mmc_filesystem_ops files return 0; } +static void mmc_poweron_changed_cb(keynode_t *key, void* data) +{ + int val; + if (vconf_get_int(VCONFKEY_DEVICED_BOOT_POWER_ON_STATUS, &val) < 0) + return; + + /* unregister poweron callback */ + vconf_ignore_key_changed(VCONFKEY_DEVICED_BOOT_POWER_ON_STATUS, + mmc_poweron_changed_cb); +} + static void mmc_init(void *data) { action_entry_add_internal(PREDEF_MOUNT_MMC, ss_mmc_inserted, NULL, NULL); action_entry_add_internal(PREDEF_UNMOUNT_MMC, ss_mmc_unmounted, NULL, NULL); action_entry_add_internal(PREDEF_FORMAT_MMC, ss_mmc_format, NULL, NULL); + + /* register vconf callback */ + vconf_notify_key_changed(VCONFKEY_DEVICED_BOOT_POWER_ON_STATUS, + mmc_poweron_changed_cb, NULL); /* mmc card mount */ + /* mmc card mount */ mmc_mount(); } -- 2.7.4