linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Linux PM <linux-pm@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	Zhang Rui <rui.zhang@intel.com>, Amit Kucheria <amitk@kernel.org>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Sebastian Reichel <sre@kernel.org>
Subject: [PATCH v1 3/4] thermal: Use thermal_tripless_zone_device_register()
Date: Wed, 30 Aug 2023 18:14:57 +0200	[thread overview]
Message-ID: <8272147.T7Z3S40VBb@kreacher> (raw)
In-Reply-To: <1870450.tdWV9SEqCh@kreacher>

From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

All of the remaining callers of thermal_zone_device_register()
can use thermal_tripless_zone_device_register(), so make them
do so in order to allow the former to be dropped.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 drivers/power/supply/power_supply_core.c                |    4 ++--
 drivers/thermal/armada_thermal.c                        |    5 +++--
 drivers/thermal/dove_thermal.c                          |    4 ++--
 drivers/thermal/intel/int340x_thermal/int3400_thermal.c |    6 +++---
 drivers/thermal/kirkwood_thermal.c                      |    4 ++--
 drivers/thermal/spear_thermal.c                         |    4 ++--
 6 files changed, 14 insertions(+), 13 deletions(-)

Index: linux-pm/drivers/power/supply/power_supply_core.c
===================================================================
--- linux-pm.orig/drivers/power/supply/power_supply_core.c
+++ linux-pm/drivers/power/supply/power_supply_core.c
@@ -1305,8 +1305,8 @@ static int psy_register_thermal(struct p
 
 	/* Register battery zone device psy reports temperature */
 	if (psy_has_property(psy->desc, POWER_SUPPLY_PROP_TEMP)) {
-		psy->tzd = thermal_zone_device_register(psy->desc->name,
-				0, 0, psy, &psy_tzd_ops, NULL, 0, 0);
+		psy->tzd = thermal_tripless_zone_device_register(psy->desc->name,
+				psy, &psy_tzd_ops, NULL);
 		if (IS_ERR(psy->tzd))
 			return PTR_ERR(psy->tzd);
 		ret = thermal_zone_device_enable(psy->tzd);
Index: linux-pm/drivers/thermal/armada_thermal.c
===================================================================
--- linux-pm.orig/drivers/thermal/armada_thermal.c
+++ linux-pm/drivers/thermal/armada_thermal.c
@@ -876,8 +876,9 @@ static int armada_thermal_probe(struct p
 		/* Wait the sensors to be valid */
 		armada_wait_sensor_validity(priv);
 
-		tz = thermal_zone_device_register(priv->zone_name, 0, 0, priv,
-						  &legacy_ops, NULL, 0, 0);
+		tz = thermal_tripless_zone_device_register(priv->zone_name,
+							   priv, &legacy_ops,
+							   NULL);
 		if (IS_ERR(tz)) {
 			dev_err(&pdev->dev,
 				"Failed to register thermal zone device\n");
Index: linux-pm/drivers/thermal/dove_thermal.c
===================================================================
--- linux-pm.orig/drivers/thermal/dove_thermal.c
+++ linux-pm/drivers/thermal/dove_thermal.c
@@ -139,8 +139,8 @@ static int dove_thermal_probe(struct pla
 		return ret;
 	}
 
-	thermal = thermal_zone_device_register("dove_thermal", 0, 0,
-					       priv, &ops, NULL, 0, 0);
+	thermal = thermal_tripless_zone_device_register("dove_thermal", priv,
+							&ops, NULL);
 	if (IS_ERR(thermal)) {
 		dev_err(&pdev->dev,
 			"Failed to register thermal zone device\n");
Index: linux-pm/drivers/thermal/intel/int340x_thermal/int3400_thermal.c
===================================================================
--- linux-pm.orig/drivers/thermal/intel/int340x_thermal/int3400_thermal.c
+++ linux-pm/drivers/thermal/intel/int340x_thermal/int3400_thermal.c
@@ -609,9 +609,9 @@ static int int3400_thermal_probe(struct
 
 	evaluate_odvp(priv);
 
-	priv->thermal = thermal_zone_device_register("INT3400 Thermal", 0, 0,
-						priv, &int3400_thermal_ops,
-						&int3400_thermal_params, 0, 0);
+	priv->thermal = thermal_tripless_zone_device_register("INT3400 Thermal", priv,
+							      &int3400_thermal_ops,
+							      &int3400_thermal_params);
 	if (IS_ERR(priv->thermal)) {
 		result = PTR_ERR(priv->thermal);
 		goto free_art_trt;
Index: linux-pm/drivers/thermal/kirkwood_thermal.c
===================================================================
--- linux-pm.orig/drivers/thermal/kirkwood_thermal.c
+++ linux-pm/drivers/thermal/kirkwood_thermal.c
@@ -71,8 +71,8 @@ static int kirkwood_thermal_probe(struct
 	if (IS_ERR(priv->sensor))
 		return PTR_ERR(priv->sensor);
 
-	thermal = thermal_zone_device_register("kirkwood_thermal", 0, 0,
-					       priv, &ops, NULL, 0, 0);
+	thermal = thermal_tripless_zone_device_register("kirkwood_thermal",
+							priv, &ops, NULL);
 	if (IS_ERR(thermal)) {
 		dev_err(&pdev->dev,
 			"Failed to register thermal zone device\n");
Index: linux-pm/drivers/thermal/spear_thermal.c
===================================================================
--- linux-pm.orig/drivers/thermal/spear_thermal.c
+++ linux-pm/drivers/thermal/spear_thermal.c
@@ -122,8 +122,8 @@ static int spear_thermal_probe(struct pl
 	stdev->flags = val;
 	writel_relaxed(stdev->flags, stdev->thermal_base);
 
-	spear_thermal = thermal_zone_device_register("spear_thermal", 0, 0,
-				stdev, &ops, NULL, 0, 0);
+	spear_thermal = thermal_tripless_zone_device_register("spear_thermal",
+							      stdev, &ops, NULL);
 	if (IS_ERR(spear_thermal)) {
 		dev_err(&pdev->dev, "thermal zone device is NULL\n");
 		ret = PTR_ERR(spear_thermal);




  parent reply	other threads:[~2023-08-30 18:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-30 16:10 [PATCH v1 0/4] thermal: Eliminate thermal_zone_device_register() Rafael J. Wysocki
2023-08-30 16:11 ` [PATCH v1 1/4] thermal: core: Clean up headers of thermal zone registration functions Rafael J. Wysocki
2023-08-30 16:13 ` [PATCH v1 2/4] thermal: core: Add function for registering tripless thermal zones Rafael J. Wysocki
2023-08-30 16:14 ` Rafael J. Wysocki [this message]
2023-08-31  6:58   ` [PATCH v1 3/4] thermal: Use thermal_tripless_zone_device_register() Miquel Raynal
2023-09-04 12:54     ` Rafael J. Wysocki
2023-09-04 12:56   ` Rafael J. Wysocki
2023-09-12 16:30   ` Sebastian Reichel
2023-08-30 16:16 ` [PATCH v1 4/4] thermal: core: Drop thermal_zone_device_register() Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8272147.T7Z3S40VBb@kreacher \
    --to=rjw@rjwysocki.net \
    --cc=amitk@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=rui.zhang@intel.com \
    --cc=sre@kernel.org \
    --cc=srinivas.pandruvada@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).