Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 243102
b: refs/heads/master
c: 57ab7da
h: refs/heads/master
v: v3
  • Loading branch information
Corentin Chary authored and Matthew Garrett committed Mar 28, 2011
1 parent 697d69c commit 2538d1c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e12e6d94db24e9050821965aa75c95e8d2c65f10
refs/heads/master: 57ab7dae27fae6a492ec968dc543106685adcad5
34 changes: 17 additions & 17 deletions trunk/drivers/platform/x86/asus-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Asus PC WMI hotkey driver
*
* Copyright(C) 2010 Intel Corporation.
* Copyright(C) 2010 Corentin Chary <corentin.chary@gmail.com>
* Copyright(C) 2010-2011 Corentin Chary <corentin.chary@gmail.com>
*
* Portions based on wistron_btns.c:
* Copyright (C) 2005 Miloslav Trmac <mitr@volny.cz>
Expand Down Expand Up @@ -87,7 +87,7 @@ MODULE_LICENSE("GPL");
#define ASUS_WMI_DEVID_CARDREADER 0x00080013

/* Input */
#define ASUS_WMI_DEVID_TOUCHPAD 0x00100011
#define ASUS_WMI_DEVID_TOUCHPAD 0x00100011
#define ASUS_WMI_DEVID_TOUCHPAD_LED 0x00100012

/* DSTS masks */
Expand Down Expand Up @@ -903,25 +903,25 @@ static void asus_wmi_notify(u32 value, void *context)

obj = (union acpi_object *)response.pointer;

if (obj && obj->type == ACPI_TYPE_INTEGER) {
code = obj->integer.value;
orig_code = code;
if (!obj || obj->type != ACPI_TYPE_INTEGER)
goto exit;

if (code >= NOTIFY_BRNUP_MIN && code <= NOTIFY_BRNUP_MAX)
code = NOTIFY_BRNUP_MIN;
else if (code >= NOTIFY_BRNDOWN_MIN &&
code <= NOTIFY_BRNDOWN_MAX)
code = NOTIFY_BRNDOWN_MIN;
code = obj->integer.value;
orig_code = code;

if (code == NOTIFY_BRNUP_MIN || code == NOTIFY_BRNDOWN_MIN) {
if (!acpi_video_backlight_support())
asus_wmi_backlight_notify(asus, orig_code);
}
if (code >= NOTIFY_BRNUP_MIN && code <= NOTIFY_BRNUP_MAX)
code = NOTIFY_BRNUP_MIN;
else if (code >= NOTIFY_BRNDOWN_MIN &&
code <= NOTIFY_BRNDOWN_MAX)
code = NOTIFY_BRNDOWN_MIN;

if (!sparse_keymap_report_event(asus->inputdev, code, 1, true))
pr_info("Unknown key %x pressed\n", code);
}
if (code == NOTIFY_BRNUP_MIN || code == NOTIFY_BRNDOWN_MIN) {
if (!acpi_video_backlight_support())
asus_wmi_backlight_notify(asus, orig_code);
} else if (!sparse_keymap_report_event(asus->inputdev, code, 1, true))
pr_info("Unknown key %x pressed\n", code);

exit:
kfree(obj);
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/platform/x86/eeepc-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Eee PC WMI hotkey driver
*
* Copyright(C) 2010 Intel Corporation.
* Copyright(C) 2010 Corentin Chary <corentin.chary@gmail.com>
* Copyright(C) 2010-2011 Corentin Chary <corentin.chary@gmail.com>
*
* Portions based on wistron_btns.c:
* Copyright (C) 2005 Miloslav Trmac <mitr@volny.cz>
Expand Down

0 comments on commit 2538d1c

Please sign in to comment.