Skip to content
Commit bbf62645 authored by Hans de Goede's avatar Hans de Goede Committed by Jiri Kosina
Browse files

HID: lenovo: Use brightness_set_blocking callback for setting LEDs brightness



The lenovo_led_brightness_set function may sleep, so we should have the
the led_class_dev's brightness_set_blocking callback point to it, rather
then the regular brightness_set callback.

When toggled through sysfs this is not a problem, but the brightness_set
callback may be called from atomic context when using LED-triggers.

Fixes: bc04b37e ("HID: lenovo: Add ThinkPad 10 Ultrabook Keyboard support")
Reviewed-by: default avatarMarek Behún <kabel@kernel.org>
Acked-by: default avatarPavel Machek <pavel@ucw.cz>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 69aea9d2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment