@@ -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);
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(-)