mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bryan Wu <bryan.wu@canonical.com>
To: 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,
	shuahkhan@gmail.com, raph@8d.com, tpiepho@freescale.com
Subject: [RFC] [PATCH 0/2] leds: use workqueue in led_set_brightness() API internally
Date: Fri, 14 Sep 2012 15:53:01 +0800	[thread overview]
Message-ID: <1347609183-26730-1-git-send-email-bryan.wu@canonical.com> (raw)

LED class drivers use duplicated workqueue method to implement
.brightness_set() and some of them forget to use workqueue, since
workqueue is required by .brightness_set() in atomic context.

This patchset add workqueue into API function led_set_brightness().
So class drivers don't need to worry about it.

With the first patch, we can remove all the workqueue handling code in
class drivers. For example, workqueue was removed from leds-gpio.c

Bryan Wu (2):
  leds: use workqueue in led_set_brightness() API internally
  leds-gpio: remove workqueue in .brightness_set()

 drivers/leds/led-class.c          | 23 +++++++++++----------
 drivers/leds/led-core.c           | 15 +++++++-------
 drivers/leds/leds-gpio.c          | 43 ++++++---------------------------------
 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 ++++----
 include/linux/leds.h              | 12 ++++++-----
 11 files changed, 49 insertions(+), 85 deletions(-)

-- 
1.7.11.4


             reply	other threads:[~2012-09-14  7:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-14  7:53 Bryan Wu [this message]
2012-09-14  7:53 ` [PATCH 1/2] " Bryan Wu
2012-09-14 22:25   ` Shuah Khan
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=1347609183-26730-1-git-send-email-bryan.wu@canonical.com \
    --to=bryan.wu@canonical.com \
    --cc=akpm@linux-foundation.org \
    --cc=broonie@opensource.wolfsonmicro.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=shuahkhan@gmail.com \
    --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

all inboxes | Powered by JetHome®