From: Soomin Kim Date: Tue, 12 Jul 2016 08:01:36 +0000 (+0900) Subject: [COMMON] thermal: samsung: Parse thermal zone name X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=09ea0359e0426473acc91d1ead26298fcdf4d41f;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] thermal: samsung: Parse thermal zone name If sensor node has tmu_name property, parse the name. Change-Id: I05df2e9e0a7c9d95ee7219f1c7e7b7fab54ab721 Signed-off-by: Soomin Kim --- diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index 108571b70d88..dac1550875a0 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -181,6 +181,7 @@ struct exynos_tmu_data { int num_of_remotes; struct remote_sensor_info *remote_sensors; int sensing_mode; + char tmu_name[THERMAL_NAME_LENGTH]; int (*tmu_initialize)(struct platform_device *pdev); void (*tmu_control)(struct platform_device *pdev, bool on); @@ -929,7 +930,7 @@ static int exynos_map_dt_data(struct platform_device *pdev) struct exynos_tmu_platform_data *pdata; struct resource res; int i; - const char *temp; + const char *temp, *tmu_name; if (!data || !pdev->dev.of_node) return -ENODEV; @@ -970,6 +971,11 @@ static int exynos_map_dt_data(struct platform_device *pdev) 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; isensing_mode = i;