All of lore.kernel.org
 help / color / mirror / Atom feed
From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: daniel.lezcano@linaro.org
Cc: rafael@kernel.org, rui.zhang@intel.com, lukasz.luba@arm.com,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	kernel@collabora.com
Subject: [RFC PATCH 17/26] thermal/drivers/dove: Migrate to thermal_zone_device_register()
Date: Thu, 21 Dec 2023 13:48:16 +0100	[thread overview]
Message-ID: <20231221124825.149141-18-angelogioacchino.delregno@collabora.com> (raw)
In-Reply-To: <20231221124825.149141-1-angelogioacchino.delregno@collabora.com>

The thermal API has a new thermal_zone_device_register() function which
is deprecating the older thermal_zone_device_register_with_trips() and
thermal_tripless_zone_device_register().

Migrate to the new thermal zone device registration function.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
 drivers/thermal/dove_thermal.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/thermal/dove_thermal.c b/drivers/thermal/dove_thermal.c
index ac30de3c0a5f..09ed02395d12 100644
--- a/drivers/thermal/dove_thermal.c
+++ b/drivers/thermal/dove_thermal.c
@@ -117,6 +117,10 @@ static const struct of_device_id dove_thermal_id_table[] = {
 
 static int dove_thermal_probe(struct platform_device *pdev)
 {
+	struct thermal_zone_device_params tzdp = {
+		.type = "dove_thermal",
+		.ops = &ops
+	};
 	struct thermal_zone_device *thermal = NULL;
 	struct dove_thermal_priv *priv;
 	int ret;
@@ -139,8 +143,8 @@ static int dove_thermal_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	thermal = thermal_tripless_zone_device_register("dove_thermal", priv,
-							&ops, NULL);
+	tzdp.devdata = priv;
+	thermal = thermal_zone_device_register(&tzdp);
 	if (IS_ERR(thermal)) {
 		dev_err(&pdev->dev,
 			"Failed to register thermal zone device\n");
-- 
2.43.0


  parent reply	other threads:[~2023-12-21 12:48 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-21 12:47 [RFC PATCH 00/26] Add thermal zones names and new registration func AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 01/26] thermal: Introduce thermal_zone_device_register() and params structure AngeloGioacchino Del Regno
2024-01-15 12:39   ` Daniel Lezcano
2024-01-16  9:58     ` AngeloGioacchino Del Regno
2024-01-18  9:39       ` AngeloGioacchino Del Regno
2024-01-18  9:46         ` AngeloGioacchino Del Regno
2024-01-22 19:19         ` Daniel Lezcano
2024-01-23 10:58           ` AngeloGioacchino Del Regno
2024-01-22 19:19         ` Daniel Lezcano
2023-12-21 12:48 ` [RFC PATCH 02/26] thermal/of: Migrate to thermal_zone_device_register() AngeloGioacchino Del Regno
2024-01-15 17:17   ` Daniel Lezcano
2024-01-16  9:50     ` AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 03/26] platform/x86: acerhdf: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 04/26] ACPI: thermal: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 05/26] thermal/drivers/da9062: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 06/26] thermal/drivers/imx: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 07/26] thermal/drivers/rcar: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 08/26] thermal/drivers/st: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 09/26] thermal: intel: pch_thermal: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 10/26] thermal: intel: quark_dts: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 11/26] thermal: intel: soc_dts_iosf: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 12/26] thermal: intel: int340x: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 13/26] thermal: int340x: processor: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 14/26] thermal: intel: x86_pkg_temp: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 15/26] power: supply: core: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 16/26] thermal/drivers/armada: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` AngeloGioacchino Del Regno [this message]
2023-12-21 12:48 ` [RFC PATCH 18/26] thermal/drivers/kirkwood: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 19/26] thermal/drivers/spear: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 20/26] thermal/drivers/int340x: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 21/26] wifi: iwlwifi: mvm: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 22/26] cxgb4: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 23/26] mlxsw: core_thermal: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 24/26] fixup! power: supply: core: " AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 25/26] thermal: Remove tripless_zone_register and register_with_trips functions AngeloGioacchino Del Regno
2023-12-21 12:48 ` [RFC PATCH 26/26] thermal: Introduce thermal zones names AngeloGioacchino Del Regno
2024-01-16  9:14   ` Daniel Lezcano
2024-01-16  9:45     ` AngeloGioacchino Del Regno
2024-01-16 11:30       ` Daniel Lezcano
2024-01-16 11:37         ` AngeloGioacchino Del Regno
2023-12-21 13:38 ` [RFC PATCH 00/26] Add thermal zones names and new registration func Rafael J. Wysocki
2023-12-21 13:54   ` AngeloGioacchino Del Regno

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=20231221124825.149141-18-angelogioacchino.delregno@collabora.com \
    --to=angelogioacchino.delregno@collabora.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=kernel@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=rafael@kernel.org \
    --cc=rui.zhang@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.