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


Groups > linux.kernel > #1354476 > unrolled thread

[PATCH 08/13] thermal: convert qcom-spmi to use devm_thermal_zone_of_sensor_register

Started byEduardo Valentin <edubezval@gmail.com>
First post2016-03-09 22:40 +0100
Last post2016-03-09 22:40 +0100
Articles 1 — 1 participant

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 08/13] thermal: convert qcom-spmi to use devm_thermal_zone_of_sensor_register Eduardo Valentin <edubezval@gmail.com> - 2016-03-09 22:40 +0100

#1354476 — [PATCH 08/13] thermal: convert qcom-spmi to use devm_thermal_zone_of_sensor_register

FromEduardo Valentin <edubezval@gmail.com>
Date2016-03-09 22:40 +0100
Subject[PATCH 08/13] thermal: convert qcom-spmi to use devm_thermal_zone_of_sensor_register
Message-ID<raTZN-5nL-21@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-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
---
 drivers/thermal/qcom-spmi-temp-alarm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/thermal/qcom-spmi-temp-alarm.c b/drivers/thermal/qcom-spmi-temp-alarm.c
index b677aad..f8a3c60 100644
--- a/drivers/thermal/qcom-spmi-temp-alarm.c
+++ b/drivers/thermal/qcom-spmi-temp-alarm.c
@@ -260,7 +260,7 @@ static int qpnp_tm_probe(struct platform_device *pdev)
 	if (ret < 0)
 		goto fail;
 
-	chip->tz_dev = thermal_zone_of_sensor_register(&pdev->dev, 0, chip,
+	chip->tz_dev = devm_thermal_zone_of_sensor_register(&pdev->dev, 0, chip,
 							&qpnp_tm_sensor_ops);
 	if (IS_ERR(chip->tz_dev)) {
 		dev_err(&pdev->dev, "failed to register sensor\n");
@@ -281,7 +281,6 @@ static int qpnp_tm_remove(struct platform_device *pdev)
 {
 	struct qpnp_tm_chip *chip = dev_get_drvdata(&pdev->dev);
 
-	thermal_zone_of_sensor_unregister(&pdev->dev, chip->tz_dev);
 	if (!IS_ERR(chip->adc))
 		iio_channel_release(chip->adc);
 
-- 
2.1.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web