[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230419083343.505780-5-daniel.lezcano@linaro.org>
Date: Wed, 19 Apr 2023 10:33:41 +0200
From: Daniel Lezcano <daniel.lezcano@...aro.org>
To: daniel.lezcano@...aro.org, rafael@...nel.org
Cc: rui.zhang@...el.com, linux-kernel@...r.kernel.org,
linux-pm@...r.kernel.org, Sujith Thomas <sujith.thomas@...el.com>,
Amit Kucheria <amitk@...nel.org>
Subject: [PATCH v4 4/6] thermal/drivers/menlow: Use thermal_zone_device()
In order to get the device associated with the thermal zone, let's use
the wrapper thermal_zone_device() instead of accessing directly the
content of the thermal zone device structure.
Signed-off-by: Daniel Lezcano <daniel.lezcano@...aro.org>
---
drivers/thermal/intel/intel_menlow.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/thermal/intel/intel_menlow.c b/drivers/thermal/intel/intel_menlow.c
index 5a6ad0552311..d720add918ff 100644
--- a/drivers/thermal/intel/intel_menlow.c
+++ b/drivers/thermal/intel/intel_menlow.c
@@ -422,7 +422,8 @@ static acpi_status intel_menlow_register_sensor(acpi_handle handle, u32 lvl,
result = intel_menlow_add_one_attribute("aux0", 0644,
aux0_show, aux0_store,
- &thermal->device, handle);
+ thermal_zone_device(thermal),
+ handle);
if (result)
return AE_ERROR;
@@ -436,7 +437,8 @@ static acpi_status intel_menlow_register_sensor(acpi_handle handle, u32 lvl,
result = intel_menlow_add_one_attribute("aux1", 0644,
aux1_show, aux1_store,
- &thermal->device, handle);
+ thermal_zone_device(thermal),
+ handle);
if (result) {
intel_menlow_unregister_sensor();
return AE_ERROR;
@@ -449,7 +451,8 @@ static acpi_status intel_menlow_register_sensor(acpi_handle handle, u32 lvl,
result = intel_menlow_add_one_attribute("bios_enabled", 0444,
bios_enabled_show, NULL,
- &thermal->device, handle);
+ thermal_zone_device(thermal),
+ handle);
if (result) {
intel_menlow_unregister_sensor();
return AE_ERROR;
--
2.34.1
Powered by blists - more mailing lists