Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3e5ce914bd17335ca74a7c7b06a776c6be6ca434
Commit:     3e5ce914bd17335ca74a7c7b06a776c6be6ca434
Parent:     3eea123df1637a88d0899626a67b83dca959efff
Author:     Henrique de Moraes Holschuh <[EMAIL PROTECTED]>
AuthorDate: Sun Sep 23 11:39:05 2007 -0300
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Sun Sep 23 22:38:15 2007 -0400

    ACPI: thinkpad-acpi: fix regression on HKEY LID event handling
    
    We were letting ThinkPad-specific LID events through to userspace again,
    instead of dropping them.  Fix it.  We don't want to give userspace the
    option of not using generic LID handling.
    
    Signed-off-by: Henrique de Moraes Holschuh <[EMAIL PROTECTED]>
    Signed-off-by: Len Brown <[EMAIL PROTECTED]>
---
 drivers/misc/thinkpad_acpi.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c
index 3efe81b..0a33c6e 100644
--- a/drivers/misc/thinkpad_acpi.c
+++ b/drivers/misc/thinkpad_acpi.c
@@ -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);
@@ -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:
@@ -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:
@@ -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);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to