[kernel] Add patch to enable keyboard backlight on Sony laptops (rhbz 728478)

Josh Boyer jwboyer at fedoraproject.org
Tue Feb 28 20:47:13 UTC 2012


commit 5f05fc562a5c2bb431ccb31e5fc9de87007d78a4
Author: Josh Boyer <jwboyer at redhat.com>
Date:   Tue Feb 28 15:42:00 2012 -0500

    Add patch to enable keyboard backlight on Sony laptops (rhbz 728478)

 kernel.spec                                        |   11 ++++-
 ...ptop-Enable-keyboard-backlight-by-default.patch |   44 ++++++++++++++++++++
 2 files changed, 54 insertions(+), 1 deletions(-)
---
diff --git a/kernel.spec b/kernel.spec
index 5523852..1f801f0 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -54,7 +54,7 @@ Summary: The Linux kernel
 # For non-released -rc kernels, this will be appended after the rcX and
 # gitX tags, so a 3 here would become part of release "0.rcX.gitX.3"
 #
-%global baserelease 1
+%global baserelease 2
 %global fedora_build %{baserelease}
 
 # base_sublevel is the kernel version we're starting with and patching
@@ -777,6 +777,9 @@ Patch21300: ACPICA-Fix-regression-in-FADT-revision-checks.patch
 #rhbz 798296
 Patch21301: cifs-fix-dentry-refcount-leak-when-opening-a-FIFO.patch
 
+#rhbz 728478
+Patch21302: sony-laptop-Enable-keyboard-backlight-by-default.patch
+
 # compat-wireless patches
 Patch50000: compat-wireless-config-fixups.patch
 Patch50001: compat-wireless-pr_fmt-warning-avoidance.patch
@@ -1499,6 +1502,9 @@ ApplyPatch ACPICA-Fix-regression-in-FADT-revision-checks.patch
 #rhbz 798296
 ApplyPatch cifs-fix-dentry-refcount-leak-when-opening-a-FIFO.patch
 
+#rhbz 728478
+ApplyPatch sony-laptop-Enable-keyboard-backlight-by-default.patch
+
 # END OF PATCH APPLICATIONS
 
 %endif
@@ -2370,6 +2376,9 @@ fi
 #                 ||----w |
 #                 ||     ||
 %changelog
+* Tue Feb 28 2012 Josh Boyer <jwboyer at redhat.com>
+- Add patch to enable keyboard backlight on Sony laptops (rhbz 728478)
+
 * Tue Feb 28 2012 Dave Jones <davej at redhat.com>
 - Disable CONFIG_USB_DEVICEFS (Deprecated).
 
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 0000000..c993fd8
--- /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 at 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 at linux.it>
+Signed-off-by: Josh Boyer <jwboyer at 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
+


More information about the scm-commits mailing list