thermal: exynos: set trips in ascending order in exynos7_tmu_initialize()
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Thu, 26 Apr 2018 11:51:28 +0000 (13:51 +0200)
committerEduardo Valentin <edubezval@gmail.com>
Sun, 6 May 2018 23:34:35 +0000 (16:34 -0700)
Set trips in ascending order in exynos7_tmu_initialize() (it should
make no difference in driver operation). This prepares the driver
code to moving trips setting from ->tmu_initialize method to
exynos_tmu_initialize().

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/samsung/exynos_tmu.c

index f24215a09a029e5ca5c00383e82ff2d187158f55..1c6c335ad0ed4133c1a7075cddce1f7468667f92 100644 (file)
@@ -618,7 +618,7 @@ static void exynos7_tmu_initialize(struct platform_device *pdev)
        sanitize_temp_error(data, trim_info);
 
        /* Write temperature code for rising and falling threshold */
-       for (i = (of_thermal_get_ntrips(tz) - 1); i >= 0; i--) {
+       for (i = 0; i < of_thermal_get_ntrips(tz); i++) {
                tz->ops->get_trip_temp(tz, i, &temp);
                temp /= MCELSIUS;
                exynos7_tmu_set_trip_temp(data, i, temp);