From: Aaron Lu Date: Mon, 1 Dec 2014 01:09:18 +0000 (+0100) Subject: ACPI / video: update condition to check if device is in _DOD list X-Git-Tag: v3.18~7^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=35d0565b95547ec12d025dc9b1394f22968d113d;p=profile%2Fcommon%2Fplatform%2Fkernel%2Flinux-artik7.git ACPI / video: update condition to check if device is in _DOD list Commit 0b8db271f159 ("ACPI / video: check _DOD list when creating backlight devices") checks if the video device is in the bind devices list to decide if we should create backlight device for it, that causes problem for one Dell Latitude E6410, where none of the video output devices are properly bound due to the way how we did the comparing between its _ADR and the _DOD's values. Solve this problem by comparing the lower 12 bits of both the device's _ADR and the _DOD's values instead of relying on bind result. Fixes: 0b8db271f159 ("ACPI / video: check _DOD list when creating backlight devices") Reported-and-tested-by: Brian Norris Signed-off-by: Aaron Lu Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 807a88a..9d75ead 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -1164,7 +1164,8 @@ static bool acpi_video_device_in_dod(struct acpi_video_device *device) return true; for (i = 0; i < video->attached_count; i++) { - if (video->attached_array[i].bind_info == device) + if ((video->attached_array[i].value.int_val & 0xfff) == + (device->device_id & 0xfff)) return true; }