thinkpad-acpi: find ACPI video device by synthetic HID
commit98ef155cd89be333de2fbbd2ecec377d0e1e8fa0
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sat, 18 Sep 2010 01:03:17 +0000 (17 22:03 -0300)
committerHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sat, 18 Sep 2010 01:03:17 +0000 (17 22:03 -0300)
tree2cd77fb5477d0059288a73600fb969a3bf216411
parent0d590ec649ce069a193c54eafe24a1c7c0d8d53e
thinkpad-acpi: find ACPI video device by synthetic HID

The Linux ACPI core locates the ACPI video devices for us and marks them
with ACPI_VIDEO_HID.  Use that information to locate the video device
instead of a half-baked hunt for _BCL.

This uncouples the detection of the number of backlight brightness
levels on ThinkPads from the ACPI paths in vid_handle.

With this change, the driver should be able to always detect whether the
ThinkPad uses a 8-level or 16-level brightness scale even on newer
models for which the vid_handle paths have not been updated yet.

It will skip deactivated devices in the ACPI device tree, which is a
change in behaviour.

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