on 01/02/2008 18:13 Andriy Gapon said the following:
I noticed that I can force AC state change via sysctl if current
Typo above, it should read "I can not".
acpi_tz_monitor() has the following lines:
/* Handle user override of active mode */
if (sc->tz_requested != TZ_ACTIVE_NONE && sc->tz_requested <
newactive = sc->tz_requested;
If say tz_requested is 1, but auto-calculated newactive is -1
then this check fails and tz_requested is ignored.
Small extra note: this is because the "none" state (least/zero
activity) has code -1, while other states are arranged so that the
the number the higher cooling activity is. So there is an exclusion
normal integer comparison.
It seems there should be a check that newactive is not -1:
if (sc->tz_requested != TZ_ACTIVE_NONE && (newactive ==
|| sc->tz_requested < newactive))
What do you think ?
This is also correct as per the similar code block above.