Skip to content

Commit

Permalink
ACPI: Always report a sync event after a lid state change
Browse files Browse the repository at this point in the history
Currently not always an EV_SYN event is reported to userland
after the EV_SW SW_LID event has been sent. This is easy to verify
by using “input-events” from input-utils and just closing and opening
the lid.

Signed-off-by: Guillem Jover <[email protected]>
Signed-off-by: Len Brown <[email protected]>
  • Loading branch information
Guillem Jover authored and lenb committed Oct 25, 2008
1 parent 16be87e commit df316e9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/acpi/button.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ static int acpi_lid_send_state(struct acpi_button *button)
return -ENODEV;
/* input layer checks if event is redundant */
input_report_switch(button->input, SW_LID, !state);
input_sync(button->input);
return 0;
}

Expand All @@ -285,8 +286,8 @@ static void acpi_button_notify(acpi_handle handle, u32 event, void *data)
input_report_key(input, keycode, 1);
input_sync(input);
input_report_key(input, keycode, 0);
input_sync(input);
}
input_sync(input);

acpi_bus_generate_proc_event(button->device, event,
++button->pushed);
Expand Down

0 comments on commit df316e9

Please sign in to comment.