Loading drivers/misc/thinkpad_acpi.c +34 −17 Original line number Diff line number Diff line Loading @@ -1196,9 +1196,30 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event) { u32 hkey; unsigned int keycode, scancode; int send_acpi_ev = 0; int send_acpi_ev; if (event != 0x80) { printk(IBM_ERR "unknown HKEY notification event %d\n", event); /* forward it to userspace, maybe it knows how to handle it */ acpi_bus_generate_netlink_event(ibm->acpi->device->pnp.device_class, ibm->acpi->device->dev.bus_id, event, 0); return; } while (1) { if (!acpi_evalf(hkey_handle, &hkey, "MHKP", "d")) { printk(IBM_ERR "failed to retrieve HKEY event\n"); return; } if (hkey == 0) { /* queue empty */ return; } send_acpi_ev = 0; if (event == 0x80 && acpi_evalf(hkey_handle, &hkey, "MHKP", "d")) { switch (hkey >> 12) { case 1: /* 0x1000-0x1FFF: key presses */ Loading @@ -1220,7 +1241,7 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event) * eat up known LID events */ if (hkey != 0x5001 && hkey != 0x5002) { printk(IBM_ERR "unknown LID-related hotkey event: 0x%04x\n", "unknown LID-related HKEY event: 0x%04x\n", hkey); send_acpi_ev = 1; } Loading @@ -1240,11 +1261,6 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event) printk(IBM_NOTICE "unhandled HKEY event 0x%04x\n", hkey); send_acpi_ev = 1; } } else { printk(IBM_ERR "unknown hotkey notification event %d\n", event); hkey = 0; send_acpi_ev = 1; } /* Legacy events */ if (send_acpi_ev || hotkey_report_mode < 2) Loading @@ -1257,6 +1273,7 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event) event, hkey); } } } static void hotkey_resume(void) { Loading Loading
drivers/misc/thinkpad_acpi.c +34 −17 Original line number Diff line number Diff line Loading @@ -1196,9 +1196,30 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event) { u32 hkey; unsigned int keycode, scancode; int send_acpi_ev = 0; int send_acpi_ev; if (event != 0x80) { printk(IBM_ERR "unknown HKEY notification event %d\n", event); /* forward it to userspace, maybe it knows how to handle it */ acpi_bus_generate_netlink_event(ibm->acpi->device->pnp.device_class, ibm->acpi->device->dev.bus_id, event, 0); return; } while (1) { if (!acpi_evalf(hkey_handle, &hkey, "MHKP", "d")) { printk(IBM_ERR "failed to retrieve HKEY event\n"); return; } if (hkey == 0) { /* queue empty */ return; } send_acpi_ev = 0; if (event == 0x80 && acpi_evalf(hkey_handle, &hkey, "MHKP", "d")) { switch (hkey >> 12) { case 1: /* 0x1000-0x1FFF: key presses */ Loading @@ -1220,7 +1241,7 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event) * eat up known LID events */ if (hkey != 0x5001 && hkey != 0x5002) { printk(IBM_ERR "unknown LID-related hotkey event: 0x%04x\n", "unknown LID-related HKEY event: 0x%04x\n", hkey); send_acpi_ev = 1; } Loading @@ -1240,11 +1261,6 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event) printk(IBM_NOTICE "unhandled HKEY event 0x%04x\n", hkey); send_acpi_ev = 1; } } else { printk(IBM_ERR "unknown hotkey notification event %d\n", event); hkey = 0; send_acpi_ev = 1; } /* Legacy events */ if (send_acpi_ev || hotkey_report_mode < 2) Loading @@ -1257,6 +1273,7 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event) event, hkey); } } } static void hotkey_resume(void) { Loading