From: Bartlomiej Zolnierkiewicz Date: Thu, 26 Apr 2018 11:51:16 +0000 (+0200) Subject: thermal: exynos: fix setting rising_threshold for Exynos5433 X-Git-Tag: v4.9.117~38 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3221a270e2c28cad0144421bd8a9a32c23d31e6c;p=platform%2Fkernel%2Flinux-amlogic.git thermal: exynos: fix setting rising_threshold for Exynos5433 [ Upstream commit 8bfc218d0ebbabcba8ed2b8ec1831e0cf1f71629 ] Add missing clearing of the previous value when setting rising temperature threshold. Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Eduardo Valentin Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index a45810b43f70..c974cb5fb958 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -598,6 +598,7 @@ static int exynos5433_tmu_initialize(struct platform_device *pdev) threshold_code = temp_to_code(data, temp); rising_threshold = readl(data->base + rising_reg_offset); + rising_threshold &= ~(0xff << j * 8); rising_threshold |= (threshold_code << j * 8); writel(rising_threshold, data->base + rising_reg_offset);