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)
commita608a9d52fa4168efd478d684039ed545a69dbcd
tree778dbb5f6f0e0851d9ae837e43d0da4b0ec0e45a
parentf6c5c1f96d976e1fb9d71fb824629c450ee0a122
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: 3a407086090b ("fujitsu-laptop: Add BL power, LED control and radio state information")
Fixes: 4f62568c1fcf ("fujitsu-laptop: Support radio LED")
Fixes: d6b88f64b0d4 ("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