From: Andrew Morton <akpm@linux-foundation.org>
To: Alexander Stein <alexander.stein@systec-electronic.com>
Cc: Richard Purdie <rpurdie@rpsys.net>,
linux-kernel@vger.kernel.org, Bryan Wu <bryan.wu@canonical.com>
Subject: Re: [PATCH] leds-pca955x: Fix race condition while setting brightness on several LEDs
Date: Thu, 10 May 2012 14:40:16 -0700 [thread overview]
Message-ID: <20120510144016.3a1b006c.akpm@linux-foundation.org> (raw)
In-Reply-To: <1328705048-21073-1-git-send-email-alexander.stein@systec-electronic.com>
On Wed, 8 Feb 2012 13:44:08 +0100
Alexander Stein <alexander.stein@systec-electronic.com> wrote:
> When issuing the following command:
> for I in 0 1 2 3 4 5 6 7; do
> echo 0 > /sys/class/leds/pca955x\:${I}/brightness;
> done
> It is possible that all the pca955x_read_ls calls are done sequentially
> before any pca955x_write_ls call is done. This updates the LS only to the
> last LED update in its set.
> Fix this by using a global lock for the pca995x device during
> pca955x_led_work.
There's the bugfix.
> Also used a struct for shared data bewteen all LEDs.
And there's an apparently unrelated change whcih created a *lot* of
noise in the patch. It would be good to separate these things, with
the bugfix being the first change.
> ...
>
> -static inline u8 pca955x_ledsel(u8 oldval, int led_num, int state)
> +static inline u8 pca955x_ledel(u8 oldval, int led_num, int state)
Why was this function renamed, and what does "ledel" mean?
next prev parent reply other threads:[~2012-05-10 21:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-08 12:44 [PATCH] leds-pca955x: Fix race condition while setting brightness on several LEDs Alexander Stein
2012-03-20 13:03 ` Alexander Stein
2012-05-08 6:51 ` Alexander Stein
2012-05-10 21:40 ` Andrew Morton [this message]
2012-05-11 7:32 ` Alexander Stein
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=20120510144016.3a1b006c.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=alexander.stein@systec-electronic.com \
--cc=bryan.wu@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rpurdie@rpsys.net \
/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