Re: [PATCH] leds: make led_blink_set IRQ safe

2014-08-25 Thread Vincent Donnefort
On Sat, Aug 23, 2014 at 01:24:56PM -0400, Tejun Heo wrote: > Hello, > > On Fri, Aug 22, 2014 at 05:21:30PM -0700, Bryan Wu wrote: > > On Tue, Aug 19, 2014 at 6:51 PM, Hugh Dickins wrote: > > > On Tue, 19 Aug 2014, Vincent Donnefort wrote: > > > > > >> This patch introduces a work which take care

Re: [PATCH] leds: make led_blink_set IRQ safe

2014-08-23 Thread Tejun Heo
Hello, On Fri, Aug 22, 2014 at 05:21:30PM -0700, Bryan Wu wrote: > On Tue, Aug 19, 2014 at 6:51 PM, Hugh Dickins wrote: > > On Tue, 19 Aug 2014, Vincent Donnefort wrote: > > > >> This patch introduces a work which take care of reseting the blink > >> workqueue and > >> avoid calling the cancel_d

Re: [PATCH] leds: make led_blink_set IRQ safe

2014-08-22 Thread Bryan Wu
On Tue, Aug 19, 2014 at 6:51 PM, Hugh Dickins wrote: > On Tue, 19 Aug 2014, Vincent Donnefort wrote: > >> This patch introduces a work which take care of reseting the blink workqueue >> and >> avoid calling the cancel_delayed_work_sync function which may sleep, from an >> IRQ >> context. >> Vin

Re: [PATCH] leds: make led_blink_set IRQ safe

2014-08-19 Thread Hugh Dickins
On Tue, 19 Aug 2014, Vincent Donnefort wrote: > This patch introduces a work which take care of reseting the blink workqueue > and > avoid calling the cancel_delayed_work_sync function which may sleep, from an > IRQ > context. > > Signed-off-by: Vincent Donnefort Thanks. It does work for me.

[PATCH] leds: make led_blink_set IRQ safe

2014-08-19 Thread Vincent Donnefort
Hugh, Here's a patch which must fix your problem. It allows to call led_blink_set() from on IRQ handler by adding a work to take care of the scheduling function cancel_delayed_work_sync(). Regards, Vincent. Vincent Donnefort (1): leds: make led_blink_set IRQ safe drivers/leds/led-class.c |

[PATCH] leds: make led_blink_set IRQ safe

2014-08-19 Thread Vincent Donnefort
This patch introduces a work which take care of reseting the blink workqueue and avoid calling the cancel_delayed_work_sync function which may sleep, from an IRQ context. Signed-off-by: Vincent Donnefort diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c index 129729d..0971554 1006