thinkpad-acpi: let other subdrivers know backlight level range
commit1fef57b3bbc452c5c1e41a0a0c3639823131a15b
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Fri, 27 May 2011 01:50:59 +0000 (26 22:50 -0300)
committerHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Fri, 27 May 2011 01:50:59 +0000 (26 22:50 -0300)
treedec5f3534f922e1ea746329656da768bf4bf0a56
parenta78d7dd48a0872114f068236baf07ca8cb30c88d
thinkpad-acpi: let other subdrivers know backlight level range

Extract the backlight level range size detection from the brightness
subdriver, and allow the other subdrivers access to that information.

This also allows us to relocate some code to a more convenient place.
The moved code was largerly unmodified, except for the return type of
tpacpi_check_std_acpi_brightness_support(), which now is correctly
marked as returning "unsigned int", and and two cosmetic fixes to make
checkpatch.pl happy.

Fixes for the NVRAM polling mode for the brightness hotkeys will need
this.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
drivers/platform/x86/thinkpad_acpi.c