diff options
Diffstat (limited to 'drivers/thermal/st')
-rw-r--r-- | drivers/thermal/st/st_thermal.c | 5 | ||||
-rw-r--r-- | drivers/thermal/st/stm_thermal.c | 5 |
2 files changed, 3 insertions, 7 deletions
diff --git a/drivers/thermal/st/st_thermal.c b/drivers/thermal/st/st_thermal.c index 1009f08e64e3..2d3042098445 100644 --- a/drivers/thermal/st/st_thermal.c +++ b/drivers/thermal/st/st_thermal.c @@ -108,8 +108,7 @@ static int st_thermal_calibration(struct st_thermal_sensor *sensor) /* Callback to get temperature from HW*/ static int st_thermal_get_temp(struct thermal_zone_device *th, int *temperature) { - struct st_thermal_sensor *sensor = th->devdata; - struct device *dev = sensor->dev; + struct st_thermal_sensor *sensor = thermal_zone_device_priv(th); unsigned int temp; unsigned int overflow; int ret; @@ -127,8 +126,6 @@ static int st_thermal_get_temp(struct thermal_zone_device *th, int *temperature) temp += sensor->cdata->temp_adjust_val; temp = mcelsius(temp); - dev_dbg(dev, "temperature: %d\n", temp); - *temperature = temp; return 0; diff --git a/drivers/thermal/st/stm_thermal.c b/drivers/thermal/st/stm_thermal.c index 735401958f01..903fcf1763f1 100644 --- a/drivers/thermal/st/stm_thermal.c +++ b/drivers/thermal/st/stm_thermal.c @@ -303,7 +303,7 @@ static int stm_disable_irq(struct stm_thermal_sensor *sensor) static int stm_thermal_set_trips(struct thermal_zone_device *tz, int low, int high) { - struct stm_thermal_sensor *sensor = tz->devdata; + struct stm_thermal_sensor *sensor = thermal_zone_device_priv(tz); u32 itr1, th; int ret; @@ -351,7 +351,7 @@ static int stm_thermal_set_trips(struct thermal_zone_device *tz, int low, int hi /* Callback to get temperature from HW */ static int stm_thermal_get_temp(struct thermal_zone_device *tz, int *temp) { - struct stm_thermal_sensor *sensor = tz->devdata; + struct stm_thermal_sensor *sensor = thermal_zone_device_priv(tz); u32 periods; int freqM, ret; @@ -558,7 +558,6 @@ static int stm_thermal_probe(struct platform_device *pdev) * Thermal_zone doesn't enable hwmon as default, * enable it here */ - sensor->th_dev->tzp->no_hwmon = false; ret = thermal_add_hwmon_sysfs(sensor->th_dev); if (ret) goto err_tz; |