summaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86
diff options
context:
space:
mode:
authorAnisse Astier <anisse@astier.eu>2009-12-10 14:18:18 +0100
committerLen Brown <len.brown@intel.com>2009-12-16 12:40:54 -0500
commitd607af93006594f7da1d4b7d44724c5308f4e892 (patch)
tree044feb73774b0f093f7d9e3e7cd9c10cfb95318a /drivers/platform/x86
parent977f9b921c82726745a8b7281dc679edb32b4906 (diff)
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>
Diffstat (limited to 'drivers/platform/x86')
-rw-r--r--drivers/platform/x86/msi-wmi.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/platform/x86/msi-wmi.c b/drivers/platform/x86/msi-wmi.c
index d7579359a2c..2c2afc1828b 100644
--- a/drivers/platform/x86/msi-wmi.c
+++ b/drivers/platform/x86/msi-wmi.c
@@ -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",