aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/thermal
diff options
context:
space:
mode:
authorEduardo Valentin <edubezval@gmail.com>2016-03-09 13:12:52 -0800
committerEduardo Valentin <edubezval@gmail.com>2016-05-17 07:28:27 -0700
commit3982204cc9baab0c28ac48e859acf7692c6159e6 (patch)
treea7b6ca9cc061c537bd8b204d500aae0123035b37 /drivers/thermal
parentthermal: convert tegra_thermal to use devm_thermal_zone_of_sensor_register (diff)
downloadlinux-dev-3982204cc9baab0c28ac48e859acf7692c6159e6.tar.xz
linux-dev-3982204cc9baab0c28ac48e859acf7692c6159e6.zip
thermal: convert ti-thermal to use devm_thermal_zone_of_sensor_register
This changes the driver to use the devm_ version of thermal_zone_of_sensor_register and cleans up the local points and unregister calls. Cc: Zhang Rui <rui.zhang@intel.com> Cc: linux-pm@vger.kernel.org Cc: linux-omap@vger.kernel.org Cc: linux-kernel@vger.kernel.org Tested-by: Keerthy <j-keerthy@ti.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/ti-soc-thermal/ti-thermal-common.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
index b213a1222295..15c0a9ac2209 100644
--- a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
+++ b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
@@ -337,7 +337,7 @@ int ti_thermal_expose_sensor(struct ti_bandgap *bgp, int id,
return -EINVAL;
/* in case this is specified by DT */
- data->ti_thermal = thermal_zone_of_sensor_register(bgp->dev, id,
+ data->ti_thermal = devm_thermal_zone_of_sensor_register(bgp->dev, id,
data, &ti_of_thermal_ops);
if (IS_ERR(data->ti_thermal)) {
/* Create thermal zone */
@@ -368,9 +368,6 @@ int ti_thermal_remove_sensor(struct ti_bandgap *bgp, int id)
if (data && data->ti_thermal) {
if (data->our_zone)
thermal_zone_device_unregister(data->ti_thermal);
- else
- thermal_zone_of_sensor_unregister(bgp->dev,
- data->ti_thermal);
}
return 0;