aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattia Dongili <malattia@linux.it>2013-11-25 17:43:50 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-25 23:03:36 -0500
commitb975dc3689fc6a3718ad288ce080924f9cb7e176 (patch)
tree78373b410fe718e1715205dedb2a366100e40cd4
parent8e45099e029bb6b369b27d8d4920db8caff5ecce (diff)
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>
-rw-r--r--drivers/platform/x86/sony-laptop.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
index c45c60f7ea2f..fb233ae7bb0e 100644
--- a/drivers/platform/x86/sony-laptop.c
+++ b/drivers/platform/x86/sony-laptop.c
@@ -140,7 +140,6 @@ MODULE_PARM_DESC(kbd_backlight_timeout,
140 "on the model (default: no change from current value)"); 140 "on the model (default: no change from current value)");
141 141
142#ifdef CONFIG_PM_SLEEP 142#ifdef CONFIG_PM_SLEEP
143static void sony_nc_kbd_backlight_resume(void);
144static void sony_nc_thermal_resume(void); 143static void sony_nc_thermal_resume(void);
145#endif 144#endif
146static int sony_nc_kbd_backlight_setup(struct platform_device *pd, 145static int sony_nc_kbd_backlight_setup(struct platform_device *pd,
@@ -1487,13 +1486,6 @@ static void sony_nc_function_resume(void)
1487 case 0x0135: 1486 case 0x0135:
1488 sony_nc_rfkill_update(); 1487 sony_nc_rfkill_update();
1489 break; 1488 break;
1490 case 0x0137:
1491 case 0x0143:
1492 case 0x014b:
1493 case 0x014c:
1494 case 0x0163:
1495 sony_nc_kbd_backlight_resume();
1496 break;
1497 default: 1489 default:
1498 continue; 1490 continue;
1499 } 1491 }
@@ -1899,25 +1891,6 @@ static void sony_nc_kbd_backlight_cleanup(struct platform_device *pd,
1899 } 1891 }
1900} 1892}
1901 1893
1902#ifdef CONFIG_PM_SLEEP
1903static void sony_nc_kbd_backlight_resume(void)
1904{
1905 int ignore = 0;
1906
1907 if (!kbdbl_ctl)
1908 return;
1909
1910 if (kbdbl_ctl->mode == 0)
1911 sony_call_snc_handle(kbdbl_ctl->handle, kbdbl_ctl->base,
1912 &ignore);
1913
1914 if (kbdbl_ctl->timeout != 0)
1915 sony_call_snc_handle(kbdbl_ctl->handle,
1916 (kbdbl_ctl->base + 0x200) |
1917 (kbdbl_ctl->timeout << 0x10), &ignore);
1918}
1919#endif
1920
1921struct battery_care_control { 1894struct battery_care_control {
1922 struct device_attribute attrs[2]; 1895 struct device_attribute attrs[2];
1923 unsigned int handle; 1896 unsigned int handle;