ACPI: ibm-acpi: clean up fan_read
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Fri, 24 Nov 2006 13:47:10 +0000 (11:47 -0200)
committerLen Brown <len.brown@intel.com>
Thu, 7 Dec 2006 06:38:39 +0000 (01:38 -0500)
commit3ef8a6096ca98d45a54999a97c7c8e14977d2e3e
treef1ebed3d60e21778a277759a0a3f5ff08938e058
parent69ba91cbd6d79aa197adbdd10a44e71c84044b44
ACPI: ibm-acpi: clean up fan_read

This patch cleans up fan_read so that it is much easier to read and
extend.

The patch fixes the userspace ABI to return "status: not supported" (like
all other ibm-acpi functions) when neither fan status or fan control are
possible.

It also fixes the userspace ABI to return EIO if ACPI access to the EC
fails, instead of returning "status: unreadable" or "speed: unreadable".

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
drivers/acpi/ibm_acpi.c