Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 95526
b: refs/heads/master
c: 2d5e94d
h: refs/heads/master
v: v3
  • Loading branch information
Henrique de Moraes Holschuh authored and Len Brown committed Apr 29, 2008
1 parent e535179 commit e5208d9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 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: 8c74adbc692a3cb040cc69d7ca3dfd86d75860a8
refs/heads/master: 2d5e94d7ca315f859a0eee1366838e8ad34dd7b2
22 changes: 15 additions & 7 deletions trunk/drivers/misc/thinkpad_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ static struct {

static struct {
u16 hotkey_mask_ff:1;
u16 bright_cmos_ec_unsync:1;
} tp_warned;

struct thinkpad_id_data {
Expand Down Expand Up @@ -4323,13 +4324,20 @@ static int brightness_get(struct backlight_device *bd)
level = lcmos;
}

if (brightness_mode == 3 && lec != lcmos) {
printk(TPACPI_ERR
"CMOS NVRAM (%u) and EC (%u) do not agree "
"on display brightness level\n",
(unsigned int) lcmos,
(unsigned int) lec);
return -EIO;
if (brightness_mode == 3) {
if (lec == lcmos)
tp_warned.bright_cmos_ec_unsync = 0;
else {
if (!tp_warned.bright_cmos_ec_unsync) {
printk(TPACPI_ERR
"CMOS NVRAM (%u) and EC (%u) do not "
"agree on display brightness level\n",
(unsigned int) lcmos,
(unsigned int) lec);
tp_warned.bright_cmos_ec_unsync = 1;
}
return -EIO;
}
}

return level;
Expand Down

0 comments on commit e5208d9

Please sign in to comment.