aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/thermal.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/thermal.c')
-rw-r--r--drivers/acpi/thermal.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 47abb94bdfb9..ad6cae938f0b 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -389,10 +389,12 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
389 } else if (crt > 0) { 389 } else if (crt > 0) {
390 unsigned long crt_k = CELSIUS_TO_KELVIN(crt); 390 unsigned long crt_k = CELSIUS_TO_KELVIN(crt);
391 /* 391 /*
392 * Allow override to lower critical threshold 392 * Allow override critical threshold
393 */ 393 */
394 if (crt_k < tz->trips.critical.temperature) 394 if (crt_k > tz->trips.critical.temperature)
395 tz->trips.critical.temperature = crt_k; 395 printk(KERN_WARNING PREFIX
396 "Critical threshold %d C\n", crt);
397 tz->trips.critical.temperature = crt_k;
396 } 398 }
397 } 399 }
398 } 400 }
@@ -1224,8 +1226,8 @@ static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz)
1224 acpi_bus_private_data_handler, 1226 acpi_bus_private_data_handler,
1225 tz->thermal_zone); 1227 tz->thermal_zone);
1226 if (ACPI_FAILURE(status)) { 1228 if (ACPI_FAILURE(status)) {
1227 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1229 printk(KERN_ERR PREFIX
1228 "Error attaching device data\n")); 1230 "Error attaching device data\n");
1229 return -ENODEV; 1231 return -ENODEV;
1230 } 1232 }
1231 1233
@@ -1658,7 +1660,7 @@ static int acpi_thermal_add(struct acpi_device *device)
1658 strcpy(tz->name, device->pnp.bus_id); 1660 strcpy(tz->name, device->pnp.bus_id);
1659 strcpy(acpi_device_name(device), ACPI_THERMAL_DEVICE_NAME); 1661 strcpy(acpi_device_name(device), ACPI_THERMAL_DEVICE_NAME);
1660 strcpy(acpi_device_class(device), ACPI_THERMAL_CLASS); 1662 strcpy(acpi_device_class(device), ACPI_THERMAL_CLASS);
1661 acpi_driver_data(device) = tz; 1663 device->driver_data = tz;
1662 mutex_init(&tz->lock); 1664 mutex_init(&tz->lock);
1663 1665
1664 1666