ACPI: thinkpad-acpi: improve fan watchdog messages
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sat, 21 Apr 2007 14:08:44 +0000 (11:08 -0300)
committerLen Brown <len.brown@intel.com>
Sun, 22 Apr 2007 03:30:34 +0000 (23:30 -0400)
Improve some of the fan watchdog error messages to be a little more
helpful.

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 e9aec87a9f095375f4990506501887b033baa069..9b4eea4c8ff7993f53175432c87eebd10b733092 100644 (file)
@@ -2524,7 +2524,7 @@ static int fan_get_status(u8 *status)
 
 static void fan_exit(void)
 {
-       vdbg_printk(TPACPI_DBG_EXIT, "cancelling any pending watchdogs\n");
+       vdbg_printk(TPACPI_DBG_EXIT, "cancelling any pending fan watchdog tasks\n");
        cancel_delayed_work(&fan_watchdog_task);
        flush_scheduled_work();
 }
@@ -2554,9 +2554,13 @@ static int fan_get_speed(unsigned int *speed)
 
 static void fan_watchdog_fire(struct work_struct *ignored)
 {
+       int rc;
+
        printk(IBM_NOTICE "fan watchdog: enabling fan\n");
-       if (fan_set_enable()) {
-               printk(IBM_ERR "fan watchdog: error while enabling fan\n");
+       rc = fan_set_enable();
+       if (rc < 0) {
+               printk(IBM_ERR "fan watchdog: error %d while enabling fan, "
+                       "will try again later...\n", -rc);
                /* reschedule for later */
                fan_watchdog_reset();
        }