From: Hyeonseong Gil Date: Mon, 5 Feb 2018 04:40:01 +0000 (+0900) Subject: [COMMON] soc: samsung: exynos-dm: Remove unsued dvfs_type X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=291af6ceaf6a4c368435e0b1efb4d4e2f6fe0ccf;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] soc: samsung: exynos-dm: Remove unsued dvfs_type Change-Id: I92aecf3261c33dc9f533122ac7e3ee430564f443 Signed-off-by: Hyeonseong Gil --- diff --git a/drivers/soc/samsung/exynos-dm.c b/drivers/soc/samsung/exynos-dm.c index 76758122863d..72a7772f99a8 100644 --- a/drivers/soc/samsung/exynos-dm.c +++ b/drivers/soc/samsung/exynos-dm.c @@ -53,9 +53,8 @@ static ssize_t show_available(struct device *dev, continue; count += snprintf(buf + count, PAGE_SIZE, - "dm_type: %d(%s), dvfs_type: %d, available = %s\n", + "dm_type: %d(%s), available = %s\n", dm->dm_data[i].dm_type, dm->dm_data[i].dm_type_name, - dm->dm_data[i].dvfs_type, dm->dm_data[i].available ? "true" : "false"); } @@ -282,16 +281,15 @@ static void print_available_dm_data(struct exynos_dm_device *dm) if (!dm->dm_data[i].available) continue; - dev_info(dm->dev, "dm_type: %d(%s), dvfs_type: %d, available = %s\n", + dev_info(dm->dev, "dm_type: %d(%s), available = %s\n", dm->dm_data[i].dm_type, dm->dm_data[i].dm_type_name, - dm->dm_data[i].dvfs_type, dm->dm_data[i].available ? "true" : "false"); } } static int exynos_dm_index_validate(enum exynos_dm_type index) { - if ((index < DM_CPU_CL0) || (index >= DM_TYPE_END)) { + if ((index < 0) || (index >= DM_TYPE_END)) { dev_err(exynos_dm->dev, "invalid dm_index (%d)\n", index); return -EINVAL; } @@ -299,29 +297,6 @@ static int exynos_dm_index_validate(enum exynos_dm_type index) return 0; } -static enum exynos_dvfs_type exynos_dm_dvfs_type(enum exynos_dm_type dm_type) -{ - enum exynos_dvfs_type dvfs_type; - - switch (dm_type) { - case DM_CPU_CL0...DM_CPU_CL1: - dvfs_type = DVFS_CPUFREQ; - break; - case DM_MIF...DM_SCORE: - dvfs_type = DVFS_DEVFREQ; - break; - case DM_GPU: - dvfs_type = DVFS_GPU; - break; - default: - dvfs_type = DVFS_TYPE_END; - dev_err(exynos_dm->dev, "invalid dm_type (%d)\n", dm_type); - break; - } - - return dvfs_type; -} - #ifdef CONFIG_OF static int exynos_dm_parse_dt(struct device_node *np, struct exynos_dm_device *dm) { @@ -351,7 +326,6 @@ static int exynos_dm_parse_dt(struct device_node *np, struct exynos_dm_device *d if (!strcmp(available, "true")) { dm->dm_data[index].dm_type = index; dm->dm_data[index].available = true; - dm->dm_data[index].dvfs_type = exynos_dm_dvfs_type(index); if (!of_property_read_string(child_np, "dm_type_name", &name)) strncpy(dm->dm_data[index].dm_type_name, name, EXYNOS_DM_TYPE_NAME_LEN); diff --git a/include/soc/samsung/exynos-dm.h b/include/soc/samsung/exynos-dm.h index db6107bbf770..09a1301003e0 100644 --- a/include/soc/samsung/exynos-dm.h +++ b/include/soc/samsung/exynos-dm.h @@ -36,13 +36,6 @@ enum exynos_dm_type { DM_TYPE_END }; -enum exynos_dvfs_type { - DVFS_CPUFREQ = 0, - DVFS_DEVFREQ, - DVFS_GPU, - DVFS_TYPE_END -}; - enum exynos_constraint_type { CONSTRAINT_MIN = 0, CONSTRAINT_MAX, @@ -88,7 +81,6 @@ struct exynos_dm_data { bool policy_use; #endif enum exynos_dm_type dm_type; - enum exynos_dvfs_type dvfs_type; char dm_type_name[EXYNOS_DM_TYPE_NAME_LEN]; u32 min_freq;