Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 165297
b: refs/heads/master
c: 4e231fa
h: refs/heads/master
i:
  165295: def4abe
v: v3
  • Loading branch information
Vladimir Serbinenko authored and Len Brown committed Aug 29, 2009
1 parent 82666e8 commit 4f44f55
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3b5e634103a5471d74e55d774e53db3df5c7b650
refs/heads/master: 4e231fa4cbd3ff53fcb7d76eccd6fd86a152a95f
12 changes: 10 additions & 2 deletions trunk/drivers/acpi/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,7 @@ acpi_video_device_lcd_get_level_current(struct acpi_video_device *device,
unsigned long long *level)
{
acpi_status status = AE_OK;
int i;

if (device->cap._BQC || device->cap._BCQ) {
char *buf = device->cap._BQC ? "_BQC" : "_BCQ";
Expand All @@ -618,8 +619,15 @@ acpi_video_device_lcd_get_level_current(struct acpi_video_device *device,

}
*level += bqc_offset_aml_bug_workaround;
device->brightness->curr = *level;
return 0;
for (i = 2; i < device->brightness->count; i++)
if (device->brightness->levels[i] == *level) {
device->brightness->curr = *level;
return 0;
}
/* BQC returned an invalid level. Stop using it. */
ACPI_WARNING((AE_INFO, "%s returned an invalid level",
buf));
device->cap._BQC = device->cap._BCQ = 0;
} else {
/* Fixme:
* should we return an error or ignore this failure?
Expand Down

0 comments on commit 4f44f55

Please sign in to comment.