thinkpad-acpi: let other subdrivers know backlight level range
commit706f23475c90a02baf6d593f9bef3928813989fd
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sat, 3 Sep 2011 18:49:25 +0000 (3 15:49 -0300)
committerHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sun, 13 Nov 2011 17:11:06 +0000 (13 15:11 -0200)
tree148a435640b89cfcae919fed899994d7980d245b
parent97ac918529e2ef92b143861bba50db503beef037
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