linux_dsm_epyc7002/drivers/platform/x86
Dan Carpenter aeaac098bd toshiba_acpi: fix and cleanup toshiba_kbd_bl_mode_store()
The current code just returns -EINVAL because mode can't be equal to
both 1 and 2.

Also this function is messy so I have cleaned it up:
1) Remove initializers like "int time = -1".  Initializing variables to
   garbage values turns off GCC's uninitialized variable warnings so it
   can lead to bugs.
2) Use kstrtoint() instead of sscanf().
3) Use SCI_KBD_MODE_FNZ and SCI_KBD_MODE_AUTO instead of magic numbers 1
   and 2.
4) Don't check for "mode == -1" because that can't happen.
5) Preserve the error code from toshiba_kbd_illum_status_set().

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-09-03 10:45:12 -07:00
..
acer-wmi.c
acerhdf.c
alienware-wmi.c
amilo-rfkill.c
apple-gmux.c
asus-laptop.c
asus-nb-wmi.c
asus-wmi.c
asus-wmi.h
classmate-laptop.c
compal-laptop.c
dell-laptop.c
dell-smo8800.c
dell-wmi-aio.c
dell-wmi.c
eeepc-laptop.c
eeepc-wmi.c
fujitsu-laptop.c
fujitsu-tablet.c
hdaps.c
hp_accel.c
hp-wireless.c
hp-wmi.c
ibm_rtl.c
ideapad-laptop.c ideapad-laptop: Constify DMI table for real! 2014-09-02 15:16:24 -07:00
intel_ips.c
intel_ips.h
intel_menlow.c
intel_mid_powerbtn.c
intel_mid_thermal.c
intel_oaktrail.c
intel_pmic_gpio.c
intel_scu_ipc.c
intel_scu_ipcutil.c
intel-rst.c
intel-smartconnect.c
Kconfig platform/x86: Enable build support for toshiba_haps 2014-08-16 01:23:56 -07:00
Makefile platform/x86: Enable build support for toshiba_haps 2014-08-16 01:23:56 -07:00
msi-laptop.c
msi-wmi.c
mxm-wmi.c
panasonic-laptop.c
pvpanic.c
samsung-laptop.c
samsung-q10.c
sony-laptop.c
tc1100-wmi.c
thinkpad_acpi.c
topstar-laptop.c
toshiba_acpi.c toshiba_acpi: fix and cleanup toshiba_kbd_bl_mode_store() 2014-09-03 10:45:12 -07:00
toshiba_bluetooth.c
toshiba_haps.c platform/x86: Toshiba HDD Active Protection Sensor 2014-08-16 01:23:56 -07:00
wmi.c
xo1-rfkill.c
xo15-ebook.c