diff options
author | Josh Boyer <jwboyer@redhat.com> | 2012-02-28 15:42:00 -0500 |
---|---|---|
committer | Josh Boyer <jwboyer@redhat.com> | 2012-02-28 15:47:00 -0500 |
commit | 5f05fc562a5c2bb431ccb31e5fc9de87007d78a4 (patch) | |
tree | 327b3addf4f02bf46007ce75dcfbdb6a433f5c11 /sony-laptop-Enable-keyboard-backlight-by-default.patch | |
parent | 18bb3c2c935e1af5ed27b66077bd9f9a2ce7d73d (diff) | |
download | kernel-5f05fc562a5c2bb431ccb31e5fc9de87007d78a4.tar.gz kernel-5f05fc562a5c2bb431ccb31e5fc9de87007d78a4.tar.xz kernel-5f05fc562a5c2bb431ccb31e5fc9de87007d78a4.zip |
Add patch to enable keyboard backlight on Sony laptops (rhbz 728478)
Diffstat (limited to 'sony-laptop-Enable-keyboard-backlight-by-default.patch')
-rw-r--r-- | sony-laptop-Enable-keyboard-backlight-by-default.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/sony-laptop-Enable-keyboard-backlight-by-default.patch b/sony-laptop-Enable-keyboard-backlight-by-default.patch new file mode 100644 index 000000000..c993fd86d --- /dev/null +++ b/sony-laptop-Enable-keyboard-backlight-by-default.patch @@ -0,0 +1,44 @@ +From 0dbc2bc96b1ec741bdd43451c286ccd45da3310b Mon Sep 17 00:00:00 2001 +From: Josh Boyer <jwboyer@redhat.com> +Date: Wed, 2 Nov 2011 14:31:59 -0400 +Subject: [PATCH] sony-laptop: Enable keyboard backlight by default + +When the keyboard backlight support was originally added, the commit said +to default it to on with a 10 second timeout. That actually wasn't the +case, as the default value is commented out for the kbd_backlight parameter. +Because it is a static variable, it gets set to 0 by default without some +other form of initialization. + +However, it seems the function to set the value wasn't actually called +immediately, so whatever state the keyboard was in initially would remain. +Then commit df410d522410e67660 was introduced during the 2.6.39 timeframe to +immediately set whatever value was present (as well as attempt to +restore/reset the state on module removal or resume). That seems to have +now forced the light off immediately when the module is loaded unless +the option kbd_backlight=1 is specified. + +Let's enable it by default again (for the first time). This should solve +https://bugzilla.redhat.com/show_bug.cgi?id=728478 + +Acked-by: Mattia Dongili <malattia@linux.it> +Signed-off-by: Josh Boyer <jwboyer@redhat.com> +--- + drivers/platform/x86/sony-laptop.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c +index c006dee..40c4705 100644 +--- a/drivers/platform/x86/sony-laptop.c ++++ b/drivers/platform/x86/sony-laptop.c +@@ -127,7 +127,7 @@ MODULE_PARM_DESC(minor, + "default is -1 (automatic)"); + #endif + +-static int kbd_backlight; /* = 1 */ ++static int kbd_backlight = 1; + module_param(kbd_backlight, int, 0444); + MODULE_PARM_DESC(kbd_backlight, + "set this to 0 to disable keyboard backlight, " +-- +1.7.7.6 + |