Skip to content
Commit 1c3fdf12 authored by Darren Hart (VMware)'s avatar Darren Hart (VMware)
Browse files

platform/x86: intel-vbtn: Simplify autorelease logic



The new notify_handler logic determining if autorelease should be used or
not is a bit awkward, and can result in more than one call to
sparse_keymap_report_event for the same event (scancode). The nesting
and long lines also made it difficult to read.

Simplify the logic by eliminating a level of nesting with a goto and
always calculate autorelease and val so we can make a single call to
sparse_keymap_report_event.

Signed-off-by: default avatarDarren Hart (VMware) <dvhart@infradead.org>
Reviewed-by: default avatarStefan Brüns <stefan.bruens@rwth-aachen.de>
Tested-by: default avatarStefan Brüns <stefan.bruens@rwth-aachen.de>
Cc: AceLan Kao <acelan.kao@canonical.com>
parent 9678d0ef
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment