linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Len Brown <lenb@kernel.org>
To: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: linux-acpi@vger.kernel.org
Subject: Re: [PATCH] ACPI: ibm-acpi: fix initial status of backlight device
Date: Thu, 8 Mar 2007 20:23:31 -0500	[thread overview]
Message-ID: <200703082023.31839.lenb@kernel.org> (raw)
In-Reply-To: <11733424952501-git-send-email-hmh@hmh.eng.br>

we checked this in already back on 2/22
it is on the ibm branch that i'll included in the next 2.6.21 pull request.

thanks,
-Len

On Thursday 08 March 2007 03:28, Henrique de Moraes Holschuh wrote:
> The brightness class core does not update the initial status of the
> device's brightness at register time.  Do it by ourselves.
> 
> Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
> Acked-by: Richard Purdie <rpurdie@rpsys.net>
> ---
>  drivers/acpi/ibm_acpi.c |   10 +++++++++-
>  1 files changed, 9 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/acpi/ibm_acpi.c b/drivers/acpi/ibm_acpi.c
> index 4cc534e..7c1b418 100644
> --- a/drivers/acpi/ibm_acpi.c
> +++ b/drivers/acpi/ibm_acpi.c
> @@ -1711,6 +1711,12 @@ static struct backlight_ops ibm_backlight_data = {
>  
>  static int brightness_init(void)
>  {
> +	int b;
> +
> +	b = brightness_get(NULL);
> +	if (b < 0)
> +		return b;
> +
>  	ibm_backlight_device = backlight_device_register("ibm", NULL, NULL,
>  							 &ibm_backlight_data);
>  	if (IS_ERR(ibm_backlight_device)) {
> @@ -1718,7 +1724,9 @@ static int brightness_init(void)
>  		return PTR_ERR(ibm_backlight_device);
>  	}
>  
> -        ibm_backlight_device->props.max_brightness = 7;
> +	ibm_backlight_device->props.max_brightness = 7;
> +	ibm_backlight_device->props.brightness = b;
> +	backlight_update_status(ibm_backlight_device);
>  
>  	return 0;
>  }

  reply	other threads:[~2007-03-09  1:23 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.64.0702272105220.12485@woody.linux-foundation.org>
2007-03-05  1:50 ` [2/6] 2.6.21-rc2: known regressions Adrian Bunk
2007-03-07 11:09   ` Jeff Garzik
2007-03-07 16:10     ` Linus Torvalds
2007-03-08 12:03     ` Ash Milsted
2007-03-08 12:31   ` Michael S. Tsirkin
2007-03-08 15:11     ` Jeff Chua
2007-03-08 18:01     ` Linus Torvalds
2007-03-08 19:06       ` Ingo Molnar
2007-03-08 19:10         ` Ingo Molnar
2007-03-08 19:47         ` Michael S. Tsirkin
2007-03-08 20:10           ` Ingo Molnar
2007-03-08 19:25       ` Ingo Molnar
2007-03-08 23:07         ` Ingo Molnar
2007-03-08 23:12           ` Ingo Molnar
2007-03-08 23:28             ` Ingo Molnar
2007-03-08 23:49           ` Linus Torvalds
2007-03-09 10:56             ` Ingo Molnar
2007-03-09 18:00               ` Linus Torvalds
2007-03-09 11:19             ` Pavel Machek
2007-03-18 16:07               ` Ingo Molnar
2007-03-18 16:40                 ` [linux-pm] " Jim Gettys
2007-03-19 20:33                   ` Bill Davidsen
2007-03-19 22:08                     ` Jim Gettys
2007-03-20 14:44                       ` Bill Davidsen
2007-03-09 17:48             ` Johannes Stezenbach
2007-03-09 23:35               ` Pavel Machek
2007-03-10  9:01                 ` Ingo Molnar
2007-03-10 11:43                   ` Stefan Seyfried
2007-03-10 13:53                     ` Johannes Stezenbach
2007-03-10 15:18                     ` Ingo Molnar
2007-03-10 22:08                       ` Pavel Machek
2007-03-11  8:20                         ` Ingo Molnar
2007-03-12  6:34                           ` Stefan Seyfried
2007-03-10 22:04                   ` s2ram (was Re: [2/6] 2.6.21-rc2: known regressions) Pavel Machek
2007-03-08 19:46       ` [2/6] 2.6.21-rc2: known regressions Michael S. Tsirkin
2007-03-08 19:57       ` Michael S. Tsirkin
2007-03-05  1:50 ` [3/6] " Adrian Bunk
2007-03-05  3:58   ` Michal Jaegermann
2007-03-06 17:08   ` Alan Cox
2007-03-07 11:12   ` Jeff Garzik
2007-03-10  1:09     ` Mathieu Bérard
2007-03-10  4:11       ` and try remove another quirk on this computers " Sergio Monteiro Basto
2007-03-10  5:41         ` Linus Torvalds
2007-03-11  4:32           ` Sergio Monteiro Basto
2007-03-12 11:37       ` Tejun Heo
2007-03-13 12:31         ` Mathieu Bérard
2007-03-13 12:41           ` Tejun Heo
2007-03-13 20:56             ` Mathieu Bérard
2007-03-14  6:07               ` Tejun Heo
2007-03-05  1:50 ` [4/6] " Adrian Bunk
2007-03-05 10:35   ` Antonino A. Daplas
2007-03-08 23:28     ` Len Brown
2007-03-05 12:21   ` Richard Purdie
2007-03-08  7:43     ` [GIT PULL] ibm-acpi 2.6.21-rc3 regression fixes Henrique de Moraes Holschuh
2007-03-08  8:28       ` [PATCH] ACPI: ibm-acpi: fix initial status of backlight device Henrique de Moraes Holschuh
2007-03-09  1:23         ` Len Brown [this message]
2007-03-08  8:28       ` [PATCH] ACPI: ibm-acpi: improve backlight power handling Henrique de Moraes Holschuh
2007-03-09  1:25         ` Len Brown

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=200703082023.31839.lenb@kernel.org \
    --to=lenb@kernel.org \
    --cc=hmh@hmh.eng.br \
    --cc=linux-acpi@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;
as well as URLs for NNTP newsgroup(s).