[COMMON] thermal: samsung: Change property name
authorSoomin Kim <sm8326.kim@samsung.com>
Thu, 21 Jul 2016 13:41:03 +0000 (22:41 +0900)
committerChungwoo Park <cww.park@samsung.com>
Mon, 21 May 2018 08:13:06 +0000 (17:13 +0900)
The property name in DT is changed to from "mode"
to "sensing_mode". Also, the thermal driver parses
property with the name.

Change-Id: I5c579a3f71634f81ff3e58421cd0cff8a11c291e
Signed-off-by: Soomin Kim <sm8326.kim@samsung.com>
drivers/thermal/samsung/exynos_tmu.c

index eb5f482ffd47208fa0680ab8748b393a38682a3c..2ee1fd832c3f731fd5aa2bdb8738a975e51ae9c1 100644 (file)
@@ -967,16 +967,18 @@ static int exynos_map_dt_data(struct platform_device *pdev)
                return -ENODEV;
        }
 
-       of_property_read_string(pdev->dev.of_node, "sensing_method", &temp);
-
        if (of_property_read_string(pdev->dev.of_node, "tmu_name", &tmu_name)) {
                dev_err(&pdev->dev, "failed to get tmu_name\n");
        } else
                strncpy(data->tmu_name, tmu_name, THERMAL_NAME_LENGTH);
 
-       for (i = 0; i<ARRAY_SIZE(sensing_method); i++)
-               if (!strcasecmp(temp, sensing_method[i]))
-                       data->sensing_mode = i;
+       if (of_property_read_string(pdev->dev.of_node, "sensing_mode", &temp))
+               dev_err(&pdev->dev, "failed to get sensing_mode of thermel sensor\n");
+       else {
+               for (i = 0; i<ARRAY_SIZE(sensing_method); i++)
+                       if (!strcasecmp(temp, sensing_method[i]))
+                               data->sensing_mode = i;
+       }
 
        data->hotplug_enable = of_property_read_bool(pdev->dev.of_node, "hotplug_enable");
        if (data->hotplug_enable) {