samsung: emc: set base mode when user_mode is disabled
authorYoungtae Lee <yt0729.lee@samsung.com>
Wed, 2 May 2018 02:27:23 +0000 (11:27 +0900)
committerlakkyung.jung <lakkyung.jung@samsung.com>
Mon, 23 Jul 2018 05:59:11 +0000 (14:59 +0900)
Change-Id: I12176542ddcba548913d5c0c0d14e81c4b9c9b6e
Signed-off-by: Youngtae Lee <yt0729.lee@samsung.com>
drivers/soc/samsung/exynos-emc.c

index dfddd59a8db211f84cacb430880d48b359684704..fd4265704852b86440547119d67ec0a12c60b101 100644 (file)
@@ -493,7 +493,7 @@ static void emc_set_mode(struct emc_mode *target_mode)
 
        spin_lock_irqsave(&emc_lock, flags);
        emc.event = emc.event | EMC_STATIC_MODE_CHANGE_STARTED;
-       emc.cur_mode = emc.req_mode = target_mode;
+       emc.req_mode = target_mode;
        spin_unlock_irqrestore(&emc_lock, flags);
 
        wake_up(&emc.wait_q);
@@ -1006,6 +1006,8 @@ static ssize_t store_user_mode(struct kobject *kobj,
        /* Cancel or Disable user mode */
        if (!val) {
                emc.user_mode = NULL;
+               mode = emc_get_base_mode();
+               emc_set_mode(mode);
                goto exit;
        }