diff options
-rw-r--r-- | drivers/misc/thinkpad_acpi.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c index 601dbe8b407a..7dc6b73e8f5b 100644 --- a/drivers/misc/thinkpad_acpi.c +++ b/drivers/misc/thinkpad_acpi.c | |||
@@ -239,6 +239,7 @@ static struct { | |||
239 | 239 | ||
240 | static struct { | 240 | static struct { |
241 | u16 hotkey_mask_ff:1; | 241 | u16 hotkey_mask_ff:1; |
242 | u16 bright_cmos_ec_unsync:1; | ||
242 | } tp_warned; | 243 | } tp_warned; |
243 | 244 | ||
244 | struct thinkpad_id_data { | 245 | struct thinkpad_id_data { |
@@ -4323,13 +4324,20 @@ static int brightness_get(struct backlight_device *bd) | |||
4323 | level = lcmos; | 4324 | level = lcmos; |
4324 | } | 4325 | } |
4325 | 4326 | ||
4326 | if (brightness_mode == 3 && lec != lcmos) { | 4327 | if (brightness_mode == 3) { |
4327 | printk(TPACPI_ERR | 4328 | if (lec == lcmos) |
4328 | "CMOS NVRAM (%u) and EC (%u) do not agree " | 4329 | tp_warned.bright_cmos_ec_unsync = 0; |
4329 | "on display brightness level\n", | 4330 | else { |
4330 | (unsigned int) lcmos, | 4331 | if (!tp_warned.bright_cmos_ec_unsync) { |
4331 | (unsigned int) lec); | 4332 | printk(TPACPI_ERR |
4332 | return -EIO; | 4333 | "CMOS NVRAM (%u) and EC (%u) do not " |
4334 | "agree on display brightness level\n", | ||
4335 | (unsigned int) lcmos, | ||
4336 | (unsigned int) lec); | ||
4337 | tp_warned.bright_cmos_ec_unsync = 1; | ||
4338 | } | ||
4339 | return -EIO; | ||
4340 | } | ||
4333 | } | 4341 | } |
4334 | 4342 | ||
4335 | return level; | 4343 | return level; |