linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] [PATCH 0/2] leds: use workqueue in led_set_brightness() API internally
@ 2012-09-14  7:53 Bryan Wu
  2012-09-14  7:53 ` [PATCH 1/2] " Bryan Wu
  2012-09-14  7:53 ` [PATCH 2/2] leds-gpio: remove workqueue in .brightness_set() Bryan Wu
  0 siblings, 2 replies; 5+ messages in thread
From: Bryan Wu @ 2012-09-14  7:53 UTC (permalink / raw)
  To: rpurdie, linux-kernel, akpm, linux-leds, broonie, fabio.baltieri,
	shuahkhan, raph, tpiepho

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-09-15 15:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2012-09-15 15:23   ` Fabio Baltieri
2012-09-14  7:53 ` [PATCH 2/2] leds-gpio: remove workqueue in .brightness_set() Bryan Wu

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).