Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sony-laptop: do not scribble keyboard backlight registers on resume

Follow-up to commit 294d31e8227c ("sony-laptop: don't change keyboard
backlight settings"): avoid messing up the state on resume. Leave it to
what was before suspending as it's anyway likely that we still don't
know what value we should write to the EC registers. This fix is also
required in 3.12

Cc: stable@vger.kernel.org
Tested-by: Karol Babioch <karol@babioch.de>
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Mattia Dongili and committed by
Linus Torvalds
b975dc36 8e45099e

-27
-27
drivers/platform/x86/sony-laptop.c
··· 140 140 "on the model (default: no change from current value)"); 141 141 142 142 #ifdef CONFIG_PM_SLEEP 143 - static void sony_nc_kbd_backlight_resume(void); 144 143 static void sony_nc_thermal_resume(void); 145 144 #endif 146 145 static int sony_nc_kbd_backlight_setup(struct platform_device *pd, ··· 1486 1487 case 0x0135: 1487 1488 sony_nc_rfkill_update(); 1488 1489 break; 1489 - case 0x0137: 1490 - case 0x0143: 1491 - case 0x014b: 1492 - case 0x014c: 1493 - case 0x0163: 1494 - sony_nc_kbd_backlight_resume(); 1495 - break; 1496 1490 default: 1497 1491 continue; 1498 1492 } ··· 1890 1898 kbdbl_ctl = NULL; 1891 1899 } 1892 1900 } 1893 - 1894 - #ifdef CONFIG_PM_SLEEP 1895 - static void sony_nc_kbd_backlight_resume(void) 1896 - { 1897 - int ignore = 0; 1898 - 1899 - if (!kbdbl_ctl) 1900 - return; 1901 - 1902 - if (kbdbl_ctl->mode == 0) 1903 - sony_call_snc_handle(kbdbl_ctl->handle, kbdbl_ctl->base, 1904 - &ignore); 1905 - 1906 - if (kbdbl_ctl->timeout != 0) 1907 - sony_call_snc_handle(kbdbl_ctl->handle, 1908 - (kbdbl_ctl->base + 0x200) | 1909 - (kbdbl_ctl->timeout << 0x10), &ignore); 1910 - } 1911 - #endif 1912 1901 1913 1902 struct battery_care_control { 1914 1903 struct device_attribute attrs[2];