Patches are removed from the already-upstream queue only by rebase,
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / releases / upstream / 2.6.24-rc1 / 0010-ACPI-thinkpad-acpi-fix-regression-on-HKEY-LID-even.patch
blob70005c7f9c1580edc61d0f5fc59b3bb2659ccf94
1 From 3e5ce914bd17335ca74a7c7b06a776c6be6ca434 Mon Sep 17 00:00:00 2001
2 From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
3 Date: Sun, 23 Sep 2007 11:39:05 -0300
4 Subject: [PATCH 10/23] ACPI: thinkpad-acpi: fix regression on HKEY LID event handling
6 We were letting ThinkPad-specific LID events through to userspace again,
7 instead of dropping them. Fix it. We don't want to give userspace the
8 option of not using generic LID handling.
10 Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
11 Signed-off-by: Len Brown <len.brown@intel.com>
12 ---
13 drivers/misc/thinkpad_acpi.c | 9 +++++++--
14 1 files changed, 7 insertions(+), 2 deletions(-)
16 diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c
17 index 3efe81b..0a33c6e 100644
18 --- a/drivers/misc/thinkpad_acpi.c
19 +++ b/drivers/misc/thinkpad_acpi.c
20 @@ -1197,6 +1197,7 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event)
21 u32 hkey;
22 unsigned int keycode, scancode;
23 int send_acpi_ev;
24 + int ignore_acpi_ev;
26 if (event != 0x80) {
27 printk(IBM_ERR "unknown HKEY notification event %d\n", event);
28 @@ -1219,6 +1220,7 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event)
31 send_acpi_ev = 0;
32 + ignore_acpi_ev = 0;
34 switch (hkey >> 12) {
35 case 1:
36 @@ -1244,6 +1246,8 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event)
37 "unknown LID-related HKEY event: 0x%04x\n",
38 hkey);
39 send_acpi_ev = 1;
40 + } else {
41 + ignore_acpi_ev = 1;
43 break;
44 case 7:
45 @@ -1263,11 +1267,12 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event)
48 /* Legacy events */
49 - if (send_acpi_ev || hotkey_report_mode < 2)
50 + if (!ignore_acpi_ev && (send_acpi_ev || hotkey_report_mode < 2)) {
51 acpi_bus_generate_proc_event(ibm->acpi->device, event, hkey);
52 + }
54 /* netlink events */
55 - if (send_acpi_ev) {
56 + if (!ignore_acpi_ev && send_acpi_ev) {
57 acpi_bus_generate_netlink_event(ibm->acpi->device->pnp.device_class,
58 ibm->acpi->device->dev.bus_id,
59 event, hkey);
60 --
61 1.5.3.4