From: Andrew Morton <akpm@linux-foundation.org>
To: Anton Vorontsov <avorontsov@ru.mvista.com>
Cc: Trent Piepho <xyzzy@speakeasy.org>,
Richard Purdie <rpurdie@linux.intel.com>,
linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] leds-gpio: Fix default state handling on OF platforms
Date: Mon, 8 Feb 2010 13:04:55 -0800 [thread overview]
Message-ID: <20100208130455.8cb90ff1.akpm@linux-foundation.org> (raw)
In-Reply-To: <20100205205437.GA4733@oksana.dev.rtsoft.ru>
On Fri, 5 Feb 2010 23:54:37 +0300
Anton Vorontsov <avorontsov@ru.mvista.com> wrote:
> The driver wrongly sets default state for LEDs that don't specify
> default-state property.
>
> Currently the driver handles default state this way:
>
> memset(&led, 0, sizeof(led));
> for_each_child_of_node(np, child) {
> state = of_get_property(child, "default-state", NULL);
> if (state) {
> if (!strcmp(state, "keep"))
> led.default_state = LEDS_GPIO_DEFSTATE_KEEP;
> ...
> }
> ret = create_gpio_led(&led, ...);
> }
>
> Which means that all LEDs that do not specify default-state will
> inherit the last value of the default-state property, which is wrong.
Does this actually happen in any 2.6.33 driver code? If so, we might
want to merge this into 2.6.33. And perhaps earlier kernels. Or not.
There's no way for me to tell :(
next prev parent reply other threads:[~2010-02-08 21:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-05 20:54 [PATCH] leds-gpio: Fix default state handling on OF platforms Anton Vorontsov
2010-02-08 21:04 ` Andrew Morton [this message]
2010-02-08 22:23 ` Anton Vorontsov
2010-02-15 19:39 ` Grant Likely
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=20100208130455.8cb90ff1.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=avorontsov@ru.mvista.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=rpurdie@linux.intel.com \
--cc=xyzzy@speakeasy.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