Commit 6f824c9f authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

Merge branch 'acpi-thermal'

* acpi-thermal:
  ACPI: thermal: Register thermal zones without valid trip points
parents da781936 8a4ff545
...@@ -662,14 +662,15 @@ static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz, ...@@ -662,14 +662,15 @@ static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz,
{ {
int result; int result;
tz->thermal_zone = thermal_zone_device_register_with_trips("acpitz", if (trip_count)
trip_table, tz->thermal_zone = thermal_zone_device_register_with_trips(
trip_count, "acpitz", trip_table, trip_count, tz,
tz, &acpi_thermal_zone_ops, NULL, passive_delay,
&acpi_thermal_zone_ops, tz->polling_frequency * 100);
NULL, else
passive_delay, tz->thermal_zone = thermal_tripless_zone_device_register(
tz->polling_frequency * 100); "acpitz", tz, &acpi_thermal_zone_ops, NULL);
if (IS_ERR(tz->thermal_zone)) if (IS_ERR(tz->thermal_zone))
return PTR_ERR(tz->thermal_zone); return PTR_ERR(tz->thermal_zone);
...@@ -901,11 +902,8 @@ static int acpi_thermal_add(struct acpi_device *device) ...@@ -901,11 +902,8 @@ static int acpi_thermal_add(struct acpi_device *device)
trip++; trip++;
} }
if (trip == trip_table) { if (trip == trip_table)
pr_warn(FW_BUG "No valid trip points!\n"); pr_warn(FW_BUG "No valid trip points!\n");
result = -ENODEV;
goto free_memory;
}
result = acpi_thermal_register_thermal_zone(tz, trip_table, result = acpi_thermal_register_thermal_zone(tz, trip_table,
trip - trip_table, trip - trip_table,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment