aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/keyboard
diff options
context:
space:
mode:
authorTing Shen <phoenixshen@chromium.org>2019-06-14 14:54:38 +0800
committerEnric Balletbo i Serra <enric.balletbo@collabora.com>2019-06-20 11:51:01 +0200
commitd096aa3eb6045a6a475a0239f3471c59eedf3d61 (patch)
treed2a57d2fe976f526dddb0938699dcc99c36680e4 /drivers/input/keyboard
parentplatform/chrome: wilco_ec: Fix unreleased lock in event_read() (diff)
downloadlinux-dev-d096aa3eb6045a6a475a0239f3471c59eedf3d61.tar.xz
linux-dev-d096aa3eb6045a6a475a0239f3471c59eedf3d61.zip
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 <phoenixshen@chromium.org> Reviewed-by: Enrico Granata <egranata@google.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: Benson Leung <bleung@chromium.org> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Diffstat (limited to 'drivers/input/keyboard')
-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);