--- zzzz-none-000/linux-3.10.107/drivers/macintosh/windfarm_pm81.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/macintosh/windfarm_pm81.c 2021-02-04 17:41:59.000000000 +0000 @@ -149,6 +149,7 @@ static unsigned int wf_smu_failure_state; static int wf_smu_readjust, wf_smu_skipping; +static bool wf_smu_overtemp; /* * ****** System Fans Control Loop ****** @@ -593,6 +594,7 @@ if (new_failure & FAILURE_OVERTEMP) { wf_set_overtemp(); wf_smu_skipping = 2; + wf_smu_overtemp = true; } /* We only clear the overtemp condition if overtemp is cleared @@ -601,8 +603,10 @@ * the control loop levels, but we don't want to keep it clear * here in this case */ - if (new_failure == 0 && last_failure & FAILURE_OVERTEMP) + if (!wf_smu_failure_state && wf_smu_overtemp) { wf_clear_overtemp(); + wf_smu_overtemp = false; + } } static void wf_smu_new_control(struct wf_control *ct) @@ -766,7 +770,6 @@ .remove = wf_smu_remove, .driver = { .name = "windfarm", - .owner = THIS_MODULE, }, };