From: Shuah Khan <shuahkhan@gmail.com>
To: Bryan Wu <bryan.wu@canonical.com>
Cc: rpurdie@rpsys.net, linux-kernel@vger.kernel.org,
akpm@linux-foundation.org, linux-leds@vger.kernel.org,
broonie@opensource.wolfsonmicro.com, fabio.baltieri@gmail.com,
raph@8d.com, tpiepho@freescale.com
Subject: Re: [PATCH 1/2] leds: use workqueue in led_set_brightness() API internally
Date: Fri, 14 Sep 2012 16:25:00 -0600 [thread overview]
Message-ID: <CAKocOOOvOPYZnH0YK2jC2ze1=sQia2B1KcX6k0tviDDyf4vW=Q@mail.gmail.com> (raw)
In-Reply-To: <1347609183-26730-2-git-send-email-bryan.wu@canonical.com>
On Fri, Sep 14, 2012 at 1:53 AM, Bryan Wu <bryan.wu@canonical.com> wrote:
> The API function led_set_brightness() and __led_set_brightness will
> call .brightness_set() function provided by led class drivers. So
> .brightness_set() function will run in atomic context, which requires
> led class drivers use workqueue in .brightness_set().
>
> Finally, all the led class driver implemented their own workqueue in
> .brightness_set(). For those missing this, we will face runtime warning
> or error when running it in atomic context.
>
> This patch adds a workqueue in led_set_brightness() internally. LED
> class driver doesn't need to care about duplicated workqueue stuff in
> their own driver.
>
> Also this patch unified the led_set_brightness() and __led_set_brightness()
>
> Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
> ---
> drivers/leds/led-class.c | 23 ++++++++++++-----------
> drivers/leds/led-core.c | 15 +++++++--------
> drivers/leds/leds.h | 11 ++---------
> drivers/leds/ledtrig-backlight.c | 8 ++++----
> drivers/leds/ledtrig-default-on.c | 2 +-
> drivers/leds/ledtrig-gpio.c | 6 +++---
> drivers/leds/ledtrig-heartbeat.c | 2 +-
> drivers/leds/ledtrig-oneshot.c | 4 ++--
> drivers/leds/ledtrig-transient.c | 8 ++++----
Bryan,
ledtrig-transient.c change looks good. Thanks for updating it.
-- Shuah
next prev parent reply other threads:[~2012-09-14 22:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-14 7:53 [RFC] [PATCH 0/2] leds: use workqueue in led_set_brightness() API internally Bryan Wu
2012-09-14 7:53 ` [PATCH 1/2] " Bryan Wu
2012-09-14 22:25 ` Shuah Khan [this message]
2012-09-15 15:23 ` Fabio Baltieri
2012-09-14 7:53 ` [PATCH 2/2] leds-gpio: remove workqueue in .brightness_set() Bryan Wu
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='CAKocOOOvOPYZnH0YK2jC2ze1=sQia2B1KcX6k0tviDDyf4vW=Q@mail.gmail.com' \
--to=shuahkhan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=bryan.wu@canonical.com \
--cc=fabio.baltieri@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=raph@8d.com \
--cc=rpurdie@rpsys.net \
--cc=tpiepho@freescale.com \
/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;
as well as URLs for NNTP newsgroup(s).