提交 d607af93 编写于 作者: A Anisse Astier 提交者: Len Brown

msi-wmi: replace one-condition switch-case with if statement

Signed-off-by: NAnisse Astier <anisse@astier.eu>
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 977f9b92
......@@ -243,14 +243,10 @@ static void msi_wmi_notify(u32 value, void *context)
}
key->last_pressed = cur;
switch (key->type) {
case KE_KEY:
/* Brightness is served via acpi video driver */
if (!backlight &&
(key->keycode == KEY_BRIGHTNESSUP ||
key->keycode == KEY_BRIGHTNESSDOWN))
break;
if (key->type == KE_KEY &&
/* Brightness is served via acpi video driver */
(backlight || (key->keycode != KEY_BRIGHTNESSUP &&
key->keycode != KEY_BRIGHTNESSDOWN))) {
dprintk("Send key: 0x%X - "
"Input layer keycode: %d\n", key->code,
key->keycode);
......@@ -260,7 +256,6 @@ static void msi_wmi_notify(u32 value, void *context)
input_report_key(msi_wmi_input_dev,
key->keycode, 0);
input_sync(msi_wmi_input_dev);
break;
}
} else
printk(KERN_INFO "Unknown key pressed - %x\n",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册