From e5208d95a7f56894fa48bb9fa228579a610d3330 Mon Sep 17 00:00:00 2001 From: Henrique de Moraes Holschuh Date: Sat, 26 Apr 2008 01:02:20 -0300 Subject: [PATCH] --- yaml --- r: 95526 b: refs/heads/master c: 2d5e94d7ca315f859a0eee1366838e8ad34dd7b2 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/misc/thinkpad_acpi.c | 22 +++++++++++++++------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index b10ae4265911..05c9d1d02a35 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8c74adbc692a3cb040cc69d7ca3dfd86d75860a8 +refs/heads/master: 2d5e94d7ca315f859a0eee1366838e8ad34dd7b2 diff --git a/trunk/drivers/misc/thinkpad_acpi.c b/trunk/drivers/misc/thinkpad_acpi.c index 601dbe8b407a..7dc6b73e8f5b 100644 --- a/trunk/drivers/misc/thinkpad_acpi.c +++ b/trunk/drivers/misc/thinkpad_acpi.c @@ -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 { @@ -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;