The Linux ACPI core locates the ACPI video devices for us and marks them
commit3da5a9393f1673e22c0eb1c0cd306692dee2bfa9
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sat, 6 Aug 2011 02:58:04 +0000 (5 23:58 -0300)
committerHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sat, 6 Aug 2011 02:58:04 +0000 (5 23:58 -0300)
tree5e05a4c7b6540cd8aa92ee4a90872c9c6c8ac90d
parent675f7660ffb0e1880011f6b3c4f9ac241491e3cd
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>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
drivers/platform/x86/thinkpad_acpi.c