Re: [PATCH v2] led: core: Use atomic bit-field for the blink-flags

2016-11-09 Thread Hans de Goede
Hi, On 08-11-16 14:58, Jacek Anaszewski wrote: From: Hans de Goede All the LED_BLINK* flags are accessed read-modify-write from e.g. led_set_brightness and led_blink_set_oneshot while both set_brightness_work and the blink_timer may be running. If these race then the

Re: [PATCH v2] led: core: Use atomic bit-field for the blink-flags

2016-11-09 Thread Hans de Goede
Hi, On 08-11-16 14:58, Jacek Anaszewski wrote: From: Hans de Goede All the LED_BLINK* flags are accessed read-modify-write from e.g. led_set_brightness and led_blink_set_oneshot while both set_brightness_work and the blink_timer may be running. If these race then the modify step done by one

Re: [PATCH v2] led: core: Use atomic bit-field for the blink-flags

2016-11-09 Thread Jacek Anaszewski
Since we've already agreed on keeping the flags in the leds.h, then I'm applying this patch to the for-next branch of linux-leds.git. Thanks, Jacek Anaszewski On 11/08/2016 02:58 PM, Jacek Anaszewski wrote: From: Hans de Goede All the LED_BLINK* flags are accessed

Re: [PATCH v2] led: core: Use atomic bit-field for the blink-flags

2016-11-09 Thread Jacek Anaszewski
Since we've already agreed on keeping the flags in the leds.h, then I'm applying this patch to the for-next branch of linux-leds.git. Thanks, Jacek Anaszewski On 11/08/2016 02:58 PM, Jacek Anaszewski wrote: From: Hans de Goede All the LED_BLINK* flags are accessed read-modify-write from e.g.

Re: [PATCH v2] led: core: Use atomic bit-field for the blink-flags

2016-11-08 Thread Jacek Anaszewski
On 11/08/2016 02:58 PM, Jacek Anaszewski wrote: From: Hans de Goede All the LED_BLINK* flags are accessed read-modify-write from e.g. led_set_brightness and led_blink_set_oneshot while both set_brightness_work and the blink_timer may be running. If these race then the

Re: [PATCH v2] led: core: Use atomic bit-field for the blink-flags

2016-11-08 Thread Jacek Anaszewski
On 11/08/2016 02:58 PM, Jacek Anaszewski wrote: From: Hans de Goede All the LED_BLINK* flags are accessed read-modify-write from e.g. led_set_brightness and led_blink_set_oneshot while both set_brightness_work and the blink_timer may be running. If these race then the modify step done by one