* [PATCH -test] ACPI video: fix an error when the brightness levels on AC and on Battery are same
@ 2009-04-14 3:02 Zhang Rui
2009-04-20 4:03 ` Len Brown
0 siblings, 1 reply; 2+ messages in thread
From: Zhang Rui @ 2009-04-14 3:02 UTC (permalink / raw)
To: Len Brown; +Cc: linux-acpi
when the brightness level on AC and brightness level on Battery
are same, the level_ac_battery is 1 in the current code,
which is wrong.
http://marc.info/?l=linux-acpi&m=123963513206858&w=2
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
---
drivers/acpi/video.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
Index: linux-2.6/drivers/acpi/video.c
===================================================================
--- linux-2.6.orig/drivers/acpi/video.c
+++ linux-2.6/drivers/acpi/video.c
@@ -768,10 +768,12 @@ acpi_video_init_brightness(struct acpi_v
* In this case, the first two elements in _BCL packages
* are also supported brightness levels that OS should take care of.
*/
- for (i = 2; i < count; i++)
- if (br->levels[i] == br->levels[0] ||
- br->levels[i] == br->levels[1])
+ for (i = 2; i < count; i++) {
+ if (br->levels[i] == br->levels[0])
level_ac_battery++;
+ if (br->levels[i] == br->levels[1])
+ level_ac_battery++;
+ }
if (level_ac_battery < 2) {
level_ac_battery = 2 - level_ac_battery;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH -test] ACPI video: fix an error when the brightness levels on AC and on Battery are same
2009-04-14 3:02 [PATCH -test] ACPI video: fix an error when the brightness levels on AC and on Battery are same Zhang Rui
@ 2009-04-20 4:03 ` Len Brown
0 siblings, 0 replies; 2+ messages in thread
From: Len Brown @ 2009-04-20 4:03 UTC (permalink / raw)
To: Zhang Rui; +Cc: linux-acpi
applied to bugzilla-13048-test branch
thanks,
Len Brown, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-04-20 4:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-14 3:02 [PATCH -test] ACPI video: fix an error when the brightness levels on AC and on Battery are same Zhang Rui
2009-04-20 4:03 ` Len Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox