From 8155ea42da71d7b0585d54bbca00c329a04a54cf Mon Sep 17 00:00:00 2001 From: Soomin Kim Date: Thu, 21 Jul 2016 22:53:45 +0900 Subject: [PATCH] [8895] thermal: samsung: Remove unnecessary array The array variable "temp_data" isn't necessary when read and caculate the temperature. So, remove it. Change-Id: Ifa87af5857986d9b3fb5ede8e19360fe9a07d834 Signed-off-by: Soomin Kim --- drivers/thermal/samsung/exynos_tmu.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index 2ee1fd832c3f..d484c3cd920c 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -745,7 +745,7 @@ static int exynos8895_tmu_read(struct exynos_tmu_data *data) { int i; u32 reg_offset, bit_offset; - u32 temp_data[TOTAL_SENSORS]; + u32 temp_data; u32 count = 0, result = 0; for (i = 0; i < TOTAL_SENSORS; i++) { @@ -758,18 +758,18 @@ static int exynos8895_tmu_read(struct exynos_tmu_data *data) bit_offset = EXYNOS_TMU_TEMP_SHIFT * ((i - 2) % 3); } - temp_data[i] = (readl(data->base + EXYNOS_TMU_REG_CURRENT_TEMP1_0 + reg_offset) + temp_data = (readl(data->base + EXYNOS_TMU_REG_CURRENT_TEMP1_0 + reg_offset) >> bit_offset) & EXYNOS_TMU_TEMP_MASK; count++; switch (data->sensing_mode) { - case AVG : result = result + temp_data[i]; + case AVG : result = result + temp_data; break; - case MAX : result = result > temp_data[i] ? result : temp_data[i]; + case MAX : result = result > temp_data ? result : temp_data; break; - case MIN : result = result < temp_data[i] ? result : temp_data[i]; + case MIN : result = result < temp_data ? result : temp_data; break; - default : result = temp_data[i]; + default : result = temp_data; break; } } -- 2.20.1