Files
twx-linux/drivers
Heinrich Toews 869a9bb515 leds: rgb: wago-m4: switch to brightness_set_blocking
wago_led_set() acquires send_lock (a mutex) and is therefore a
sleeping function. Assigning it to brightness_set violates the LED
core API contract: brightness_set is called directly from atomic
context (timer/softirq) and must not sleep. On non-RT kernels this
would trigger BUG: scheduling while atomic.

Use brightness_set_blocking instead. The LED core automatically
defers calls through a workqueue, making the sleeping path safe.
Update the function signature to return int and add return 0 as
required by the blocking callback prototype.

Reported-by: Oleg Karfich <oleg.karfich@wago.com>
Signed-off-by: Heinrich Toews <ht@twx-software.de>
2026-06-18 18:13:10 +02:00
..
2025-06-20 09:56:35 -05:00