ACPI: thinkpad-acpi: fix a fan watchdog invocation
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sat, 28 Apr 2007 01:00:11 +0000 (22:00 -0300)
committerLen Brown <len.brown@intel.com>
Sun, 29 Apr 2007 01:41:18 +0000 (21:41 -0400)
The fan control watchdog was being called in one place even when the fan
control operation had failed.  Fix it.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/misc/thinkpad_acpi.c

index f824259fa6116dc405a5bc119b0fb41d4c941aac..b85f0960e608d2ec0cbe3386a297754adfb44cfe 100644 (file)
@@ -2888,9 +2888,10 @@ static ssize_t fan_pwm1_store(struct device *dev,
        if (!rc && (status &
                    (TP_EC_FAN_AUTO | TP_EC_FAN_FULLSPEED)) == 0) {
                rc = fan_set_level(newlevel);
-               if (!rc)
+               if (!rc) {
                        fan_update_desired_level(newlevel);
-               fan_watchdog_reset();
+                       fan_watchdog_reset();
+               }
        }
 
        mutex_unlock(&fan_mutex);