• Azael Avalos's avatar
    toshiba_acpi: Add set_fan_status function · 3e07e5ba
    Azael Avalos authored
    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: default avatarAzael Avalos <coproscefalo@gmail.com>
    Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
    3e07e5ba
toshiba_acpi.c 72.2 KB