Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1354478 > unrolled thread

[PATCH 13/13] thermal: convert ti-thermal to use devm_thermal_zone_of_sensor_register

Started byEduardo Valentin <edubezval@gmail.com>
First post2016-03-09 22:40 +0100
Last post2016-03-15 13:30 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 13/13] thermal: convert ti-thermal to use devm_thermal_zone_of_sensor_register Eduardo Valentin <edubezval@gmail.com> - 2016-03-09 22:40 +0100
    Re: [PATCH 13/13] thermal: convert ti-thermal to use  devm_thermal_zone_of_sensor_register Keerthy <a0393675@ti.com> - 2016-03-15 13:30 +0100

#1354478 — [PATCH 13/13] thermal: convert ti-thermal to use devm_thermal_zone_of_sensor_register

FromEduardo Valentin <edubezval@gmail.com>
Date2016-03-09 22:40 +0100
Subject[PATCH 13/13] thermal: convert ti-thermal to use devm_thermal_zone_of_sensor_register
Message-ID<raTZN-5nL-31@gated-at.bofh.it>
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
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
---
 drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 5 +----
 1 file changed, 1 insertion(+), 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 b213a12..15c0a9a 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;
-- 
2.1.4

[toc] | [next] | [standalone]


#1358015 — Re: [PATCH 13/13] thermal: convert ti-thermal to use devm_thermal_zone_of_sensor_register

FromKeerthy <a0393675@ti.com>
Date2016-03-15 13:30 +0100
SubjectRe: [PATCH 13/13] thermal: convert ti-thermal to use devm_thermal_zone_of_sensor_register
Message-ID<rcWgO-21h-17@gated-at.bofh.it>
In reply to#1354478
Hi Eduardo,

On Thursday 10 March 2016 03:05 AM, Eduardo Valentin wrote:
> This changes the driver to use the devm_ version
> of thermal_zone_of_sensor_register and cleans
> up the  local points and unregister calls.
>

Boot tested on dra7xx-evm, dra72x-evm, pandaboard-es.
Also checked the thermal sysfs entries on am57xx-beagle-x15.

Tested-by: Keerthy <j-keerthy@ti.com>


> 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
> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
> ---
>   drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 5 +----
>   1 file changed, 1 insertion(+), 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 b213a12..15c0a9a 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;
>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web