From: Ting Shen Date: Fri, 14 Jun 2019 06:54:38 +0000 (+0800) Subject: Input: cros_ec_keyb: mask out extra flags in event_type X-Git-Tag: v5.4-rc1~597^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d096aa3eb6045a6a475a0239f3471c59eedf3d61;p=platform%2Fkernel%2Flinux-rpi.git 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 Reviewed-by: Enrico Granata Acked-by: Dmitry Torokhov Reviewed-by: Benson Leung Signed-off-by: Enric Balletbo i Serra --- diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c index d560011..38cb6d8 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);