thinkpad-acpi: let other subdrivers know backlight level range
commite5f83a29e663c0076f85e0d7de0b0b6f868d6ff5
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Fri, 27 May 2011 01:52:22 +0000 (26 22:52 -0300)
committerHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Fri, 27 May 2011 01:52:22 +0000 (26 22:52 -0300)
tree27950f58307180f858b10131999eb8e1ae9dfdc4
parent93f3b074d8c0e2f007f87b2591fa08346441e63b
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