alistair23-linux/drivers/misc
Henrique de Moraes Holschuh 0081b16202 ACPI: thinkpad-acpi: fix fan sleep/resume path
This fixes a regression from v2.6.27, caused by commit
5814f737e1cd2cfa2893badd62189acae3e1e1fd, "ACPI: thinkpad-acpi:
attempt to preserve fan state on resume".

It is possible for fan_suspend() to fail to properly initialize
fan_control_desired_level as required by fan_resume(), resulting on
the fan always being set to level 7 on resume if the user didn't
touch the fan controller.

In order to get fan sleep/resume handling to work right:

1. Fix the fan_suspend handling of the T43 firmware quirk. If it is
still undefined, we didn't touch the fan yet and that means we have no
business doing it on resume.

2. Store the fan level on its own variable to avoid any possible
issues with hijacking fan_control_desired_level (which isn't supposed
to have anything other than 0-7 in it, anyway).

3. Change the fan_resume code to me more straightforward to understand
(although we DO optimize the boolean logic there, otherwise it looks
disgusting).

4. Add comments to help understand what the code is supposed to be
doing.

5. Change fan_set_level to be less strict about how auto and
full-speed modes are requested.

http://bugzilla.kernel.org/show_bug.cgi?id=11982

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Reported-by: Tino Keitel <tino.keitel@tikei.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-11-26 19:24:22 -05:00
..
c2port misc: C2port needs <linux/sched.h> 2008-11-15 11:36:06 -08:00
hdpuftrs hdpuftrs: fix build 2008-10-30 11:38:46 -07:00
ibmasm drivers/misc: replace remaining __FUNCTION__ occurrences 2008-04-29 08:06:03 -07:00
sgi-gru GRU: fix for debug option 2008-11-19 18:49:57 -08:00
sgi-xp sgi-xp: only build for ia64-sn2 when CONFIG_IA64_GENERIC specified 2008-10-30 11:38:46 -07:00
acer-wmi.c Acer-WMI: fingers off backlight if video.ko is serving this functionality 2008-11-08 00:27:10 -05:00
asus-laptop.c asus-acpi: fingers off backlight if video.ko is serving this functionality 2008-11-08 00:27:26 -05:00
atmel-ssc.c drivers/misc/atmel-ssc.c: Removed duplicated include 2008-07-24 14:06:51 +02:00
atmel_pwm.c atmel_pwm: set up only one PWM clock when allocating a clock 2008-07-24 10:47:25 -07:00
atmel_tclib.c atmel_tc library 2008-03-04 13:41:23 +01:00
compal-laptop.c compal: fingers off backlight if video.ko is serving this functionality 2008-11-08 00:27:27 -05:00
eeepc-laptop.c eeepc-laptop: fingers off backlight if video.ko is serving this functionality 2008-11-08 00:27:27 -05:00
eeprom_93cx6.c removed unused #include <linux/version.h>'s 2008-08-23 12:14:12 -07:00
enclosure.c [SCSI] ses: fix up functionality after class_device->device conversion 2008-04-22 15:16:29 -05:00
fujitsu-laptop.c Merge branch 'video' into release 2008-11-11 21:15:50 -05:00
hp-wmi.c HP-WMI: additional keycode (or typo) 2008-10-20 08:52:34 -07:00
hpilo.c HP iLO driver 2008-07-21 21:55:02 -07:00
hpilo.h HP iLO driver 2008-07-21 21:55:02 -07:00
ics932s401.c ics932s401: new clock generator chip driver 2008-11-12 17:17:18 -08:00
intel_menlow.c intel_menlow: Add comment documenting legal GTHS values 2008-11-06 20:24:24 -05:00
ioc4.c drivers/misc: replace remaining __FUNCTION__ occurrences 2008-04-29 08:06:03 -07:00
Kconfig Add c2 port support 2008-11-12 17:17:18 -08:00
kgdbts.c kgdbts: Use HW breakpoints with CONFIG_DEBUG_RODATA 2008-05-28 12:49:57 -05:00
lkdtm.c NULL noise: drivers/misc 2008-03-30 14:18:41 -07:00
Makefile Add c2 port support 2008-11-12 17:17:18 -08:00
msi-laptop.c msi-laptop: fingers off backlight if video.ko is serving this functionality 2008-11-08 00:27:28 -05:00
panasonic-laptop.c remove unused #include <version.h>'s 2008-11-01 09:50:12 -07:00
phantom.c device create: misc: convert device_create_drvdata to device_create 2008-10-16 09:24:43 -07:00
sony-laptop.c sony-laptop: printk tweak 2008-11-26 18:12:14 -05:00
tc1100-wmi.c tc1100-wmi: Add driver for HP Compaq TC1100 Tablets 2008-02-05 15:07:16 -05:00
thinkpad_acpi.c ACPI: thinkpad-acpi: fix fan sleep/resume path 2008-11-26 19:24:22 -05:00
tifm_7xx1.c tifm: clear interrupt mask bits before setting them on adapter init 2008-03-10 18:01:18 -07:00
tifm_core.c memstick: initial commit for Sony MemoryStick support 2008-02-09 11:08:34 -08:00