[COMMON] samsung: exynos-dm: compare min/max freq
authorHyeonseong Gil <hs.gil@samsung.com>
Tue, 25 Jul 2017 08:06:05 +0000 (17:06 +0900)
committerChungwoo Park <cww.park@samsung.com>
Mon, 21 May 2018 08:26:08 +0000 (17:26 +0900)
Change-Id: Idf37bbeebf01c7fac9d104a37a1d5f6d0d6e0c38
Signed-off-by: Hyeonseong Gil <hs.gil@samsung.com>
drivers/soc/samsung/exynos-dm.c

index 40feefeb824907fdc37f4b654a9eec836dc08400..e7e2e57861a4375fc6009f3fa1c6badf62f2e466 100644 (file)
@@ -664,6 +664,8 @@ int policy_update_call_to_DM(enum exynos_dm_type dm_type, u32 min_freq, u32 max_
        mutex_lock(&exynos_dm->lock);
        do_gettimeofday(&before);
 
+       min_freq = min(min_freq, max_freq);
+
        dm = &exynos_dm->dm_data[dm_type];
        if ((dm->policy_min_freq == min_freq) && (dm->policy_max_freq == max_freq))
                goto out;