OSDN Git Service

platform/x86: fujitsu-laptop: clean up use_alt_lcd_levels handling
authorMichał Kępień <kernel@kempniu.pl>
Wed, 5 Apr 2017 06:49:05 +0000 (08:49 +0200)
committerDarren Hart (VMware) <dvhart@infradead.org>
Thu, 13 Apr 2017 17:16:06 +0000 (10:16 -0700)
commite06e4831d51decc23419b6c3d045f9c8c876da7d
treeaa991939fd76fe05683189f80d9b7fc187704a24
parentbd079a2cc5afe3d980f054a72bc08dbbe17c216c
platform/x86: fujitsu-laptop: clean up use_alt_lcd_levels handling

The value of each module parameter can be changed on the fly via sysfs.
However, the current way of handling use_alt_lcd_levels prevents the
user from dynamically switching from a value of 0 or 1 back to
autodetection as the latter is only performed upon ACPI device
instantiation.  Fix this by moving autodetection (in a simplified form)
to set_lcd_level() and changing module parameter type to int.  Do not
announce autodetection results in a debug message as current value of
use_alt_lcd_levels can simply be read from sysfs.  Clarify module
parameter description.

Signed-off-by: Michał Kępień <kernel@kempniu.pl>
Reviewed-by: Jonathan Woithe <jwoithe@just42.net>
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
drivers/platform/x86/fujitsu-laptop.c