Linux Power Management development
 help / color / mirror / Atom feed
* [RFC] thermal: thermal_hwmon: Convert to hwmon_device_register_with_info()
@ 2016-12-27 13:00 Fabio Estevam
  2016-12-27 15:24 ` Guenter Roeck
  0 siblings, 1 reply; 3+ messages in thread
From: Fabio Estevam @ 2016-12-27 13:00 UTC (permalink / raw)
  To: edubezval; +Cc: linux, linux-pm, Fabio Estevam

From: Fabio Estevam <fabio.estevam@nxp.com>

Booting Linux on a mx6q based board leads to the following warning:

(NULL device *): hwmon_device_register() is deprecated. Please convert the
driver to use hwmon_device_register_with_info().

,so do as suggested.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
 drivers/thermal/thermal_hwmon.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/thermal/thermal_hwmon.c b/drivers/thermal/thermal_hwmon.c
index 541af59..22397dd 100644
--- a/drivers/thermal/thermal_hwmon.c
+++ b/drivers/thermal/thermal_hwmon.c
@@ -165,7 +165,8 @@ int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
 
 	INIT_LIST_HEAD(&hwmon->tz_list);
 	strlcpy(hwmon->type, tz->type, THERMAL_NAME_LENGTH);
-	hwmon->device = hwmon_device_register(NULL);
+	hwmon->device = hwmon_device_register_with_info(NULL, NULL, NULL,
+							NULL, NULL);
 	if (IS_ERR(hwmon->device)) {
 		result = PTR_ERR(hwmon->device);
 		goto free_mem;
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-12-27 16:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-27 13:00 [RFC] thermal: thermal_hwmon: Convert to hwmon_device_register_with_info() Fabio Estevam
2016-12-27 15:24 ` Guenter Roeck
2016-12-27 16:04   ` Fabio Estevam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox