提交 fcb44e12 编写于 作者: A Adam Lee 提交者: Matthew Garrett

thinkpad_acpi: add the ability setting TPACPI_LED_NONE by quirk

Some new Lenovo or ThinkPad laptops don't have EC controllable LEDs,
their LED quirks are 0. This patch set led_supported=TPACPI_LED_NONE
when quirk equals 0.
Signed-off-by: NAdam Lee <adam.lee@canonical.com>
Acked-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: NMatthew Garrett <matthew.garrett@nebula.com>
上级 edf2d778
......@@ -5296,6 +5296,16 @@ static int __init led_init(struct ibm_init_struct *iibm)
led_supported = led_init_detect_mode();
if (led_supported != TPACPI_LED_NONE) {
useful_leds = tpacpi_check_quirks(led_useful_qtable,
ARRAY_SIZE(led_useful_qtable));
if (!useful_leds) {
led_handle = NULL;
led_supported = TPACPI_LED_NONE;
}
}
vdbg_printk(TPACPI_DBG_INIT, "LED commands are %s, mode %d\n",
str_supported(led_supported), led_supported);
......@@ -5309,9 +5319,6 @@ static int __init led_init(struct ibm_init_struct *iibm)
return -ENOMEM;
}
useful_leds = tpacpi_check_quirks(led_useful_qtable,
ARRAY_SIZE(led_useful_qtable));
for (i = 0; i < TPACPI_LED_NUMLEDS; i++) {
tpacpi_leds[i].led = -1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册