From: Len Brown <lenb@kernel.org>
To: akpm@linux-foundation.org
Cc: linux-acpi@vger.kernel.org, malattia@linux.it
Subject: Re: [patch 13/13] sony_acpi: fix sony_acpi backlight registration and unregistration
Date: Wed, 7 Feb 2007 16:11:05 -0500 [thread overview]
Message-ID: <200702071611.05457.lenb@kernel.org> (raw)
In-Reply-To: <200702060010.l160AMUf003757@shell0.pdx.osdl.net>
NAK, included in sony-laptop series.
AFAICT, Mattia applied all the various sony fixes floating about to sony_acpi.c
before re-naming it to sony-laptop.c, where it lives in the acpi-test tree today.
thanks,
-Len
On Monday 05 February 2007 19:09, akpm@linux-foundation.org wrote:
> From: Mattia Dongili <malattia@linux.it>
>
> Initialize the current brightness if the driver registration was successful
> and unregister the driver in the error exit path.
>
> Signed-off-by: Mattia Dongili <malattia@linux.it>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
> drivers/acpi/sony_acpi.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff -puN drivers/acpi/sony_acpi.c~sony_acpi-fix-sony_acpi-backlight-registration-and-unregistration drivers/acpi/sony_acpi.c
> --- a/drivers/acpi/sony_acpi.c~sony_acpi-fix-sony_acpi-backlight-registration-and-unregistration
> +++ a/drivers/acpi/sony_acpi.c
> @@ -354,9 +354,14 @@ static int sony_acpi_add(struct acpi_dev
> if (ACPI_SUCCESS(acpi_get_handle(sony_acpi_handle, "GBRT", &handle))) {
> sony_backlight_device = backlight_device_register("sony", NULL,
> NULL, &sony_backlight_properties);
> +
> if (IS_ERR(sony_backlight_device)) {
> printk(LOG_PFX "unable to register backlight device\n");
> + sony_backlight_device = NULL;
> }
> + else
> + sony_backlight_properties.brightness =
> + sony_backlight_get_brightness(sony_backlight_device);
> }
>
> for (item = sony_acpi_values; item->name; ++item) {
> @@ -400,6 +405,9 @@ static int sony_acpi_add(struct acpi_dev
> return 0;
>
> outproc:
> + if (sony_backlight_device)
> + backlight_device_unregister(sony_backlight_device);
> +
> for (item = sony_acpi_values; item->name; ++item)
> if (item->proc)
> remove_proc_entry(item->name, acpi_device_dir(device));
> _
> -
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
prev parent reply other threads:[~2007-02-07 21:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-06 0:09 [patch 13/13] sony_acpi: fix sony_acpi backlight registration and unregistration akpm
2007-02-07 21:11 ` Len Brown [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=200702071611.05457.lenb@kernel.org \
--to=lenb@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=linux-acpi@vger.kernel.org \
--cc=malattia@linux.it \
/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