diff options
author | Anisse Astier <anisse@astier.eu> | 2009-12-10 08:18:18 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-12-16 12:40:54 -0500 |
commit | d607af93006594f7da1d4b7d44724c5308f4e892 (patch) | |
tree | 044feb73774b0f093f7d9e3e7cd9c10cfb95318a /drivers/platform/x86/msi-wmi.c | |
parent | 977f9b921c82726745a8b7281dc679edb32b4906 (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/msi-wmi.c')
-rw-r--r-- | drivers/platform/x86/msi-wmi.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/platform/x86/msi-wmi.c b/drivers/platform/x86/msi-wmi.c index d7579359a2c5..2c2afc1828b8 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) | |||
243 | } | 243 | } |
244 | key->last_pressed = cur; | 244 | key->last_pressed = cur; |
245 | 245 | ||
246 | switch (key->type) { | 246 | if (key->type == KE_KEY && |
247 | case KE_KEY: | 247 | /* Brightness is served via acpi video driver */ |
248 | /* Brightness is served via acpi video driver */ | 248 | (backlight || (key->keycode != KEY_BRIGHTNESSUP && |
249 | if (!backlight && | 249 | key->keycode != KEY_BRIGHTNESSDOWN))) { |
250 | (key->keycode == KEY_BRIGHTNESSUP || | ||
251 | key->keycode == KEY_BRIGHTNESSDOWN)) | ||
252 | break; | ||
253 | |||
254 | dprintk("Send key: 0x%X - " | 250 | dprintk("Send key: 0x%X - " |
255 | "Input layer keycode: %d\n", key->code, | 251 | "Input layer keycode: %d\n", key->code, |
256 | key->keycode); | 252 | key->keycode); |
@@ -260,7 +256,6 @@ static void msi_wmi_notify(u32 value, void *context) | |||
260 | input_report_key(msi_wmi_input_dev, | 256 | input_report_key(msi_wmi_input_dev, |
261 | key->keycode, 0); | 257 | key->keycode, 0); |
262 | input_sync(msi_wmi_input_dev); | 258 | input_sync(msi_wmi_input_dev); |
263 | break; | ||
264 | } | 259 | } |
265 | } else | 260 | } else |
266 | printk(KERN_INFO "Unknown key pressed - %x\n", | 261 | printk(KERN_INFO "Unknown key pressed - %x\n", |