Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 71616
b: refs/heads/master
c: 3e5ce91
h: refs/heads/master
v: v3
  • Loading branch information
Henrique de Moraes Holschuh authored and Len Brown committed Sep 24, 2007
1 parent d27b491 commit df60381
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 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: 3eea123df1637a88d0899626a67b83dca959efff
refs/heads/master: 3e5ce914bd17335ca74a7c7b06a776c6be6ca434
9 changes: 7 additions & 2 deletions trunk/drivers/misc/thinkpad_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1197,6 +1197,7 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event)
u32 hkey;
unsigned int keycode, scancode;
int send_acpi_ev;
int ignore_acpi_ev;

if (event != 0x80) {
printk(IBM_ERR "unknown HKEY notification event %d\n", event);
Expand All @@ -1219,6 +1220,7 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event)
}

send_acpi_ev = 0;
ignore_acpi_ev = 0;

switch (hkey >> 12) {
case 1:
Expand All @@ -1244,6 +1246,8 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event)
"unknown LID-related HKEY event: 0x%04x\n",
hkey);
send_acpi_ev = 1;
} else {
ignore_acpi_ev = 1;
}
break;
case 7:
Expand All @@ -1263,11 +1267,12 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event)
}

/* Legacy events */
if (send_acpi_ev || hotkey_report_mode < 2)
if (!ignore_acpi_ev && (send_acpi_ev || hotkey_report_mode < 2)) {
acpi_bus_generate_proc_event(ibm->acpi->device, event, hkey);
}

/* netlink events */
if (send_acpi_ev) {
if (!ignore_acpi_ev && send_acpi_ev) {
acpi_bus_generate_netlink_event(ibm->acpi->device->pnp.device_class,
ibm->acpi->device->dev.bus_id,
event, hkey);
Expand Down

0 comments on commit df60381

Please sign in to comment.