lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250210073158.336522-2-florin.leotescu@oss.nxp.com>
Date: Mon, 10 Feb 2025 09:31:57 +0200
From: florin.leotescu@....nxp.com
To: Jean Delvare <jdelvare@...e.com>,
	Guenter Roeck <linux@...ck-us.net>,
	linux-hwmon@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	viorel.suman@....com
Cc: Florin Leotescu <florin.leotescu@....com>
Subject: [PATCH 1/2] hwmon: emc2305: Update cooling device registration to include device node

From: Florin Leotescu <florin.leotescu@....com>

This patch updates the EMC2305 hwmon driver to register the thermal
cooling device with Device Tree (DTS) node. This change allows
cooling device to be configured based on the properties defined
in the Device Tree.

Signed-off-by: Florin Leotescu <florin.leotescu@....com>
---
 drivers/hwmon/emc2305.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/hwmon/emc2305.c b/drivers/hwmon/emc2305.c
index 4d39fbd83769..18e765902d32 100644
--- a/drivers/hwmon/emc2305.c
+++ b/drivers/hwmon/emc2305.c
@@ -293,8 +293,9 @@ static int emc2305_set_single_tz(struct device *dev, int idx)
 	pwm = data->pwm_min[cdev_idx];
 
 	data->cdev_data[cdev_idx].cdev =
-		thermal_cooling_device_register(emc2305_fan_name[idx], data,
-						&emc2305_cooling_ops);
+		devm_thermal_of_cooling_device_register(dev, dev->of_node,
+							emc2305_fan_name[idx], data,
+							&emc2305_cooling_ops);
 
 	if (IS_ERR(data->cdev_data[cdev_idx].cdev)) {
 		dev_err(dev, "Failed to register cooling device %s\n", emc2305_fan_name[idx]);
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ