Messages in this thread | | | Date | Fri, 14 Sep 2012 16:25:00 -0600 | Subject | Re: [PATCH 1/2] leds: use workqueue in led_set_brightness() API internally | From | Shuah Khan <> |
| |
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
| |