aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTing Shen <[email protected]>2019-06-14 14:54:38 +0800
committerEnric Balletbo i Serra <[email protected]>2019-06-20 11:51:01 +0200
commitd096aa3eb6045a6a475a0239f3471c59eedf3d61 (patch)
treed2a57d2fe976f526dddb0938699dcc99c36680e4
parentaa8b8f9f9bef4696b6d9f1ca4d0de2b403db65c5 (diff)
Input: cros_ec_keyb: mask out extra flags in event_type
http://crosreview.com/1341159 added a EC_MKBP_HAS_MORE_EVENTS flag to the event_type field, the receiver side should mask out this extra bit when processing the event. Signed-off-by: Ting Shen <[email protected]> Reviewed-by: Enrico Granata <[email protected]> Acked-by: Dmitry Torokhov <[email protected]> Reviewed-by: Benson Leung <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]>
-rw-r--r--drivers/input/keyboard/cros_ec_keyb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c
index d56001181598..38cb6d82d8fe 100644
--- a/drivers/input/keyboard/cros_ec_keyb.c
+++ b/drivers/input/keyboard/cros_ec_keyb.c
@@ -237,7 +237,7 @@ static int cros_ec_keyb_work(struct notifier_block *nb,
if (queued_during_suspend && !device_may_wakeup(ckdev->dev))
return NOTIFY_OK;
- switch (ckdev->ec->event_data.event_type) {
+ switch (ckdev->ec->event_data.event_type & EC_MKBP_EVENT_TYPE_MASK) {
case EC_MKBP_EVENT_KEY_MATRIX:
pm_wakeup_event(ckdev->dev, 0);