toshiba_acpi: Add set_fan_status function
authorAzael Avalos <coproscefalo@gmail.com>
Tue, 28 Jul 2015 01:22:23 +0000 (19:22 -0600)
committerDarren Hart <dvhart@linux.intel.com>
Wed, 29 Jul 2015 03:16:45 +0000 (20:16 -0700)
commit3e07e5baa2af166a6f38a51e14ff036c341a57c7
tree733af7f5468ef2b69c47bad1d27e96e74b200743
parent1e574dbfadafd9fd1f2a414efb731d7538277e71
toshiba_acpi: Add set_fan_status function

This patch adds a new function named "set_fan_status" to complement
its get* counterpart, as well as to avoid code duplication between
"fan_proc_write" and "fan_store".

Also, both functions (get*, set*) are now checking for TOS_FAILURE,
TOS_NOT_SUPPORTED and TOS_SUCCESS (to be on par with the rest of the
HCI/SCI functions), printing an error message, returning -ENODEV and
zero respectively.

The proc and sysfs functions were updated to reflect these changes as
well, returning -EIO for proc, and propagating the error value on the
sysfs functions.

Signed-off-by: Azael Avalos <coproscefalo@gmail.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
drivers/platform/x86/toshiba_acpi.c