From: Wook Song Date: Mon, 10 Jul 2017 07:24:43 +0000 (+0900) Subject: pass-hal: tm2: Remove tm2-specific define statements for cpu X-Git-Tag: accepted/tizen/4.0/unified/20170816.010833^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9e123cadb5b6d8ad1163ef0cb63a34f1e26b1fce;p=platform%2Fadaptation%2Ftm2%2Fpass-hal-tm2.git pass-hal: tm2: Remove tm2-specific define statements for cpu This patch removes the tm2-specific define statements such as TM2_CPU_MIN_NUM and TM2_CPU_MAX_NUM, which were used to check CPU indexes out of range. The reasons why we need to remove this board-specific code are that 1) such CPU indexes out of range would never occur and 2) it is required to standardize the HAL function implementation. Change-Id: I10c96c36975bbe5b33e6102742fac917682616f1 Signed-off-by: Wook Song --- diff --git a/src/cpu/cpu.c b/src/cpu/cpu.c index 9cac0de..18f407e 100644 --- a/src/cpu/cpu.c +++ b/src/cpu/cpu.c @@ -54,9 +54,6 @@ #define TMU_TEMP_PATH_SUFFIX "/temp" #define TMU_POLICY_PATH_SUFFIX "/policy" -#define TM2_CPU_MIN_NUM 0 -#define TM2_CPU_MAX_NUM 7 - static int tm2_dvfs_get_curr_governor(char *res_name, char *governor) { char path[PATH_MAX]; @@ -262,8 +259,6 @@ static int tm2_hotplug_get_online_state(char *res_name, int cpu) if ((!res_name)) return -EINVAL; - if ((cpu < TM2_CPU_MIN_NUM) || (cpu > TM2_CPU_MAX_NUM)) - return -EINVAL; snprintf(path, PATH_MAX, "%s%d%s", CPU_ONLINE_PATH_PREFIX, @@ -284,8 +279,6 @@ static int tm2_hotplug_set_online_state(char *res_name, int cpu, int on) if ((!res_name)) return -EINVAL; - if ((cpu < TM2_CPU_MIN_NUM) || (cpu > TM2_CPU_MAX_NUM)) - return -EINVAL; if ((on != CPU_ONLINE_STATE_ON) && (on != CPU_ONLINE_STATE_OFF)) return -EINVAL;