]> git.baikalelectronics.ru Git - kernel.git/commit
platform/x86: fujitsu-laptop: use brightness_set_blocking for LED-setting callbacks
authorMicha? K?pie? <kernel@kempniu.pl>
Fri, 23 Dec 2016 09:00:08 +0000 (10:00 +0100)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 28 Dec 2016 10:38:10 +0000 (12:38 +0200)
commit27d34f67bdb4fcb7663a9b1fe11e3912b38306bf
tree778dbb5f6f0e0851d9ae837e43d0da4b0ec0e45a
parenta0a35193e9a7d5360178c341bd20aabf7cdd00b9
platform/x86: fujitsu-laptop: use brightness_set_blocking for LED-setting callbacks

All LED-setting functions in fujitsu-laptop are currently assigned to
the brightness_set callback, which is incorrect because they can sleep
(due to their use of call_fext_func(), which in turn issues ACPI calls)
and the documentation (in include/linux/leds.h) clearly states they must
not.  Assign them to brightness_set_blocking instead and change them to
match the expected function prototype.

This change makes it possible to use Fujitsu-specific LEDs with "heavy"
triggers, like disk-activity or phy0rx.

Fixes: 947166c01d59 ("fujitsu-laptop: Add BL power, LED control and radio state information")
Fixes: 95e2429f01e7 ("fujitsu-laptop: Support radio LED")
Fixes: 535dff9852a9 ("fujitsu-laptop: Add support for eco LED")
Signed-off-by: Michał Kępień <kernel@kempniu.pl>
Acked-by: Jonathan Woithe <jwoithe@just42.net>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/fujitsu-laptop.c