From: Corentin Chary <corentin.chary@gmail.com>
To: Corentin Chary <corentin.chary@gmail.com>,
Matthew Garrett <mjg59@srcf.ucam.org>,
linux-kernel@vger.kernel.org,
acpi4asus-user@lists.sourceforge.net,
Darren Salt <linux@youmustbejoking.demon.co.uk>
Subject: Re: [PATCH 2.6.29] eeepc-laptop: report brightness control events via the input layer
Date: Sun, 5 Apr 2009 10:22:21 +0200 [thread overview]
Message-ID: <71cd59b00904050122r626028c7y62a0cd44411e08b7@mail.gmail.com> (raw)
In-Reply-To: <504C592648%linux@youmustbejoking.demon.co.uk>
On Sun, Apr 5, 2009 at 12:10 AM, Darren Salt
<linux@youmustbejoking.demon.co.uk> wrote:
> I demand that Corentin Chary may or may not have written...
>
>>>> How can brn be -2?
>>> If notify_brn() wasn't called, it will be.
>
>> Oh, yeah, I miss the if() before notify_brn()
>
> Easily missed. ;-)
>
>>>> And why -2?
>>> Because notify_brn() won't return it (and if it ever does, it needs to be
>>> fixed). (Yes, I know, "magic numbers" and all that...)
>
>> Maybe a negative known error code could be used here
>
> I see the following:
>
> * read_acpi_int() returns 0 and writes the brightness setting to *val, or
> returns -1 and writes -1 to *val if the ACPI call failed.
>
> * get_acpi() returns whatever was written to value by read_acpi_int(), or
> -ENODEV if there's no ACPI method which can be called.
>
> * read_brightness is a trivial wrapper for get_acpi().
>
> * notify_brn() stores the result of read_brightness and returns the
> previously-stored value, so it can store then later return -ENODEV, -1 or
> the brightness setting.
>
> This makes -ENODEV a suitable value. Replacing that -1 with something other
> than -ENODEV might be good, but I don't think that that really matters right
> now (though I've replaced the "!= -1" in the original version of the patch
> with "< 0").
>
> Revised patch follows...
Thanks, it's cleaner now =).
There was just a little
ERROR: that open brace { should be on the previous line
#36: FILE: drivers/platform/x86/eeepc-laptop.c:521:
if (bd)
+ {
But I corrected that. It is now pushed in acpi4asus tree.
--
Corentin Chary
http://xf.iksaif.net
next prev parent reply other threads:[~2009-04-05 8:22 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-03 17:57 Darren Salt
2009-04-04 4:18 ` Matthew Garrett
2009-04-04 8:33 ` Corentin Chary
2009-04-04 12:20 ` Darren Salt
2009-04-04 12:35 ` Corentin Chary
2009-04-04 22:10 ` Darren Salt
2009-04-05 8:22 ` Corentin Chary [this message]
2009-06-08 15:24 ` Alan Jenkins
2009-06-13 8:55 ` Corentin Chary
2009-06-13 9:33 ` Alan Jenkins
2009-06-13 10:06 ` Corentin Chary
2009-06-13 12:55 ` Darren Salt
2009-06-13 17:51 ` Alan Jenkins
2009-06-14 19:26 ` Corentin Chary
2009-06-15 8:09 ` Alan Jenkins
2009-06-15 8:12 ` Alan Jenkins
2009-06-16 8:33 ` [gpm] " Richard Hughes
2009-06-16 8:34 ` Alan Jenkins
2009-06-16 8:47 ` Richard Hughes
2009-06-16 9:44 ` Corentin Chary
2009-06-16 10:04 ` Richard Hughes
2009-06-18 13:33 ` Alan Jenkins
2009-06-18 22:44 ` Corentin Chary
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=71cd59b00904050122r626028c7y62a0cd44411e08b7@mail.gmail.com \
--to=corentin.chary@gmail.com \
--cc=acpi4asus-user@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@youmustbejoking.demon.co.uk \
--cc=mjg59@srcf.ucam.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®