lkml.org 
[lkml]   [2023]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH 04/26] ACPI: thermal: Migrate to thermal_zone_device_register()
Date
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/acpi/thermal.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index ee28ca93d983..e4f44e7bb3ec 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -664,16 +664,18 @@ static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz,
unsigned int trip_count,
int passive_delay)
{
+ struct thermal_zone_device_params tzdp = {
+ .type = "acpitz",
+ .devdata = tz,
+ .ops = &acpi_thermal_zone_ops,
+ .trips = tz->trip_table,
+ .num_trips = trip_count,
+ .passive_delay = passive_delay,
+ .polling_delay = tz->polling_frequency * 100,
+ };
int result;

- tz->thermal_zone = thermal_zone_device_register_with_trips("acpitz",
- tz->trip_table,
- trip_count,
- 0, tz,
- &acpi_thermal_zone_ops,
- NULL,
- passive_delay,
- tz->polling_frequency * 100);
+ tz->thermal_zone = thermal_zone_device_register(&tzdp);
if (IS_ERR(tz->thermal_zone))
return PTR_ERR(tz->thermal_zone);

--
2.43.0

\
 
 \ /
  Last update: 2023-12-21 13:50    [W:0.089 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site