mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mattia Dongili <malattia@linux.it>
To: Josh Boyer <jwboyer@redhat.com>
Cc: Matthew Garrett <mjg@redhat.com>,
	platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sony-laptop: Enable keyboard backlight by default
Date: Thu, 3 Nov 2011 10:57:17 +0900	[thread overview]
Message-ID: <20111103015716.GA7421@kamineko.org> (raw)
In-Reply-To: <20111102183159.GD19809@zod.bos.redhat.com>

On Wed, Nov 02, 2011 at 02:32:00PM -0400, Josh Boyer wrote:
> 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

I am trying to recollect the reason why I commented out that assignment
at some point... but it seems I can't, to the point that I have a commit
to my local tree that changes the value in the commented out code...
Thanks for spotting this.

> Signed-off-by: Josh Boyer <jwboyer@redhat.com>

Acked-by: Mattia Dongili <malattia@linux.it>

> ---
> 
> 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, "
-- 
mattia
:wq!

      reply	other threads:[~2011-11-03  1:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-02 18:32 Josh Boyer
2011-11-03  1:57 ` Mattia Dongili [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111103015716.GA7421@kamineko.org \
    --to=malattia@linux.it \
    --cc=jwboyer@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjg@redhat.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®