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

Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
Anisse Astier 2009-12-10 14:18:18 +01:00 committed by Len Brown
parent 977f9b921c
commit d607af9300

View File

@ -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 */ (backlight || (key->keycode != KEY_BRIGHTNESSUP &&
if (!backlight && key->keycode != KEY_BRIGHTNESSDOWN))) {
(key->keycode == KEY_BRIGHTNESSUP ||
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)
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",