aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/acpi/thermal.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 9073ada88835..e9f28e075cf8 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -575,7 +575,23 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
575 575
576static int acpi_thermal_get_trip_points(struct acpi_thermal *tz) 576static int acpi_thermal_get_trip_points(struct acpi_thermal *tz)
577{ 577{
578 return acpi_thermal_trips_update(tz, ACPI_TRIPS_INIT); 578 int i, valid, ret = acpi_thermal_trips_update(tz, ACPI_TRIPS_INIT);
579
580 if (ret)
581 return ret;
582
583 valid = tz->trips.critical.flags.valid |
584 tz->trips.hot.flags.valid |
585 tz->trips.passive.flags.valid;
586
587 for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE; i++)
588 valid |= tz->trips.active[i].flags.valid;
589
590 if (!valid) {
591 printk(KERN_WARNING FW_BUG "No valid trip found\n");
592 return -ENODEV;
593 }
594 return 0;
579} 595}
580 596
581static void acpi_thermal_check(void *data) 597static void acpi_thermal_check(void *data)