Commit d607af93 authored by Anisse Astier's avatar Anisse Astier Committed by Len Brown

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

Signed-off-by: default avatarAnisse Astier <anisse@astier.eu>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 977f9b92
...@@ -243,14 +243,10 @@ static void msi_wmi_notify(u32 value, void *context) ...@@ -243,14 +243,10 @@ static void msi_wmi_notify(u32 value, void *context)
} }
key->last_pressed = cur; key->last_pressed = cur;
switch (key->type) { if (key->type == KE_KEY &&
case KE_KEY:
/* Brightness is served via acpi video driver */ /* Brightness is served via acpi video driver */
if (!backlight && (backlight || (key->keycode != KEY_BRIGHTNESSUP &&
(key->keycode == KEY_BRIGHTNESSUP || key->keycode != KEY_BRIGHTNESSDOWN))) {
key->keycode == KEY_BRIGHTNESSDOWN))
break;
dprintk("Send key: 0x%X - " dprintk("Send key: 0x%X - "
"Input layer keycode: %d\n", key->code, "Input layer keycode: %d\n", key->code,
key->keycode); key->keycode);
...@@ -260,7 +256,6 @@ static void msi_wmi_notify(u32 value, void *context) ...@@ -260,7 +256,6 @@ static void msi_wmi_notify(u32 value, void *context)
input_report_key(msi_wmi_input_dev, input_report_key(msi_wmi_input_dev,
key->keycode, 0); key->keycode, 0);
input_sync(msi_wmi_input_dev); input_sync(msi_wmi_input_dev);
break;
} }
} else } else
printk(KERN_INFO "Unknown key pressed - %x\n", printk(KERN_INFO "Unknown key pressed - %x\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment