From: Zhang Rui Date: Wed, 18 Mar 2009 08:27:12 +0000 (+0800) Subject: ACPI video: support _BCL packages that don't export brightness levels when machine... X-Git-Tag: v2.6.30-rc1~199^2~16^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d32f69470c2081ffdfd82740ac19f940790f9e93;p=pandora-kernel.git ACPI video: support _BCL packages that don't export brightness levels when machine is on AC/Battery Many buggy BIOSes don't export the brightness levels when machine is on AC/Battery in the _BCL method. Reformat the _BCL package for these laptops: now the elements in device->brightness->levels[] are like: levels[0]: brightness level when on AC power. levels[1]: brightness level when on Battery power. levels[2]: supported brightness level 1. levels[3]: supported brightness level 2. ... levels[n]: supported brightness level n-1. levels[n + 1]: supported brightness level n. So if there are n supported brightness levels on this laptop, we will have n+2 entries in device->brightnes->levels[]. level[0] and level[1] are invalid on the laptops that don't export the brightness levels on AC/Battery. Fortunately, we never use these two values at all, even for the valid ones. http://bugzilla.kernel.org/show_bug.cgi?id=12249 Signed-off-by: Zhang Rui Acked-by: Matthew Garrett Acked-by: Thomas Renninger Signed-off-by: Len Brown --- Reading git-diff-tree failed