]> git.baikalelectronics.ru Git - kernel.git/commit
toshiba_acpi: Add extra check to backlight code
authorAzael Avalos <coproscefalo@gmail.com>
Mon, 4 Aug 2014 15:21:01 +0000 (09:21 -0600)
committerMatthew Garrett <matthew.garrett@nebula.com>
Sat, 16 Aug 2014 08:23:54 +0000 (01:23 -0700)
commit38b479cab4c7c7b678859cbe2ebe30a8a30de5dc
tree32b430149d6da304e69ec9b1094f0e5f7ed4e783
parent3b5ac8fc1f678534c54934f6003cf61bf7e473ba
toshiba_acpi: Add extra check to backlight code

Some Toshiba models (most notably Qosmios) come with an
incomplete backlight method where the AML code doesn't
check for write or read commands and always returns
HCI_SUCCESS and the actual brightness (and in some
cases the max brightness), thus allowing the backlight
interface to be registered without write support.

This patch changes the set_lcd_brightness function,
checking the returned values for values greater than
zero to avoid registering a broken backlight interface.

Signed-off-by: Azael Avalos <coproscefalo@gmail.com>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
drivers/platform/x86/toshiba_acpi.c