From 14436873816684293285f97f1f0f64a2002d7e9b Mon Sep 17 00:00:00 2001 From: Youngtae Lee Date: Wed, 2 May 2018 11:27:23 +0900 Subject: [PATCH] samsung: emc: set base mode when user_mode is disabled Change-Id: I12176542ddcba548913d5c0c0d14e81c4b9c9b6e Signed-off-by: Youngtae Lee --- drivers/soc/samsung/exynos-emc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/soc/samsung/exynos-emc.c b/drivers/soc/samsung/exynos-emc.c index dfddd59a8db2..fd4265704852 100644 --- a/drivers/soc/samsung/exynos-emc.c +++ b/drivers/soc/samsung/exynos-emc.c @@ -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; } -- 2.20.1