From: Zhang Rui Date: Thu, 11 Dec 2008 21:24:52 +0000 (-0500) Subject: ACPI: video: Fix reversed brightness behavior on ThinkPad SL series X-Git-Tag: v2.6.27.16~8 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a6ba08286ecf31795637bc1a9d8e182548aedd2;p=pandora-kernel.git ACPI: video: Fix reversed brightness behavior on ThinkPad SL series commit 935e5f290ec1eb0f1c15004421f5fd3154380fd5 upstream. Section B.6.2 of ACPI 3.0b specification that defines _BCL method doesn't require the brightness levels returned to be sorted. At least ThinkPad SL300 (and probably all IdeaPads) returns the array reversed (i.e. bightest levels have lowest indexes), which causes the brightness management behave in completely reversed manner on these machines (brightness increases when the laptop is idle, while the display dims when used). Sorting the array by brightness level values after reading the list fixes the issue. http://bugzilla.kernel.org/show_bug.cgi?id=12037 Signed-off-by: Zhang Rui Tested-by: Lubomir Rintel Signed-off-by: Len Brown Signed-off-by: Thomas Renninger Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed