[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <71cd59b00904050122r626028c7y62a0cd44411e08b7@mail.gmail.com>
Date: Sun, 5 Apr 2009 10:22:21 +0200
From: Corentin Chary <corentin.chary@...il.com>
To: Corentin Chary <corentin.chary@...il.com>,
Matthew Garrett <mjg59@...f.ucam.org>,
linux-kernel@...r.kernel.org, acpi4asus-user@...ts.sourceforge.net,
Darren Salt <linux@...mustbejoking.demon.co.uk>
Subject: Re: [PATCH 2.6.29] eeepc-laptop: report brightness control events via
the input layer
On Sun, Apr 5, 2009 at 12:10 AM, Darren Salt
<linux@...mustbejoking.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists