]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/acpi/thermal.c
Merge branch 'ull' into test
[linux-2.6-omap-h63xx.git] / drivers / acpi / thermal.c
index 47abb94bdfb96c2ac0140f44eb4ac922f30d460f..ad6cae938f0b8cabfff04f305c577f0970bd1cb8 100644 (file)
@@ -389,10 +389,12 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
                        } else if (crt > 0) {
                                unsigned long crt_k = CELSIUS_TO_KELVIN(crt);
                                /*
-                                * Allow override to lower critical threshold
+                                * Allow override critical threshold
                                 */
-                               if (crt_k < tz->trips.critical.temperature)
-                                       tz->trips.critical.temperature = crt_k;
+                               if (crt_k > tz->trips.critical.temperature)
+                                       printk(KERN_WARNING PREFIX
+                                               "Critical threshold %d C\n", crt);
+                               tz->trips.critical.temperature = crt_k;
                        }
                }
        }
@@ -1224,8 +1226,8 @@ static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz)
                                  acpi_bus_private_data_handler,
                                  tz->thermal_zone);
        if (ACPI_FAILURE(status)) {
-               ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
-                               "Error attaching device data\n"));
+               printk(KERN_ERR PREFIX
+                               "Error attaching device data\n");
                return -ENODEV;
        }
 
@@ -1658,7 +1660,7 @@ static int acpi_thermal_add(struct acpi_device *device)
        strcpy(tz->name, device->pnp.bus_id);
        strcpy(acpi_device_name(device), ACPI_THERMAL_DEVICE_NAME);
        strcpy(acpi_device_class(device), ACPI_THERMAL_CLASS);
-       acpi_driver_data(device) = tz;
+       device->driver_data = tz;
        mutex_init(&tz->lock);