diff options
Diffstat (limited to 'drivers/platform/x86/thinkpad_acpi.c')
-rw-r--r-- | drivers/platform/x86/thinkpad_acpi.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 52daaa816e53..9da5fe715e6a 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c | |||
@@ -7685,25 +7685,15 @@ static int fan_set_speed(int speed) | |||
7685 | 7685 | ||
7686 | static void fan_watchdog_reset(void) | 7686 | static void fan_watchdog_reset(void) |
7687 | { | 7687 | { |
7688 | static int fan_watchdog_active; | ||
7689 | |||
7690 | if (fan_control_access_mode == TPACPI_FAN_WR_NONE) | 7688 | if (fan_control_access_mode == TPACPI_FAN_WR_NONE) |
7691 | return; | 7689 | return; |
7692 | 7690 | ||
7693 | if (fan_watchdog_active) | ||
7694 | cancel_delayed_work(&fan_watchdog_task); | ||
7695 | |||
7696 | if (fan_watchdog_maxinterval > 0 && | 7691 | if (fan_watchdog_maxinterval > 0 && |
7697 | tpacpi_lifecycle != TPACPI_LIFE_EXITING) { | 7692 | tpacpi_lifecycle != TPACPI_LIFE_EXITING) |
7698 | fan_watchdog_active = 1; | 7693 | mod_delayed_work(tpacpi_wq, &fan_watchdog_task, |
7699 | if (!queue_delayed_work(tpacpi_wq, &fan_watchdog_task, | 7694 | msecs_to_jiffies(fan_watchdog_maxinterval * 1000)); |
7700 | msecs_to_jiffies(fan_watchdog_maxinterval | 7695 | else |
7701 | * 1000))) { | 7696 | cancel_delayed_work(&fan_watchdog_task); |
7702 | pr_err("failed to queue the fan watchdog, " | ||
7703 | "watchdog will not trigger\n"); | ||
7704 | } | ||
7705 | } else | ||
7706 | fan_watchdog_active = 0; | ||
7707 | } | 7697 | } |
7708 | 7698 | ||
7709 | static void fan_watchdog_fire(struct work_struct *ignored) | 7699 | static void fan_watchdog_fire(struct work_struct *ignored) |