Skip to content

Commit 3bcce2e

Browse files
gwendalcrEnric Balletbo i Serra
authored andcommitted
Revert "Input: cros_ec_keyb - add back missing mask for event_type"
This reverts commit 62c3801. This patch is not needed anymore since we clear EC_MKBP_HAS_MORE_EVENTS flag before calling the notifiers in patch "9d9518f5b52a (platform: chrome: cros_ec: handle MKBP more events flag)" Signed-off-by: Gwendal Grignou <[email protected]> Acked-by: Dmitry Torokhov <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]>
1 parent 3300fdd commit 3bcce2e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/input/keyboard/cros_ec_keyb.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,6 @@ static int cros_ec_keyb_work(struct notifier_block *nb,
226226
{
227227
struct cros_ec_keyb *ckdev = container_of(nb, struct cros_ec_keyb,
228228
notifier);
229-
uint8_t mkbp_event_type = ckdev->ec->event_data.event_type &
230-
EC_MKBP_EVENT_TYPE_MASK;
231229
u32 val;
232230
unsigned int ev_type;
233231

@@ -239,7 +237,7 @@ static int cros_ec_keyb_work(struct notifier_block *nb,
239237
if (queued_during_suspend && !device_may_wakeup(ckdev->dev))
240238
return NOTIFY_OK;
241239

242-
switch (mkbp_event_type) {
240+
switch (ckdev->ec->event_data.event_type & EC_MKBP_EVENT_TYPE_MASK) {
243241
case EC_MKBP_EVENT_KEY_MATRIX:
244242
pm_wakeup_event(ckdev->dev, 0);
245243

@@ -266,7 +264,7 @@ static int cros_ec_keyb_work(struct notifier_block *nb,
266264
case EC_MKBP_EVENT_SWITCH:
267265
pm_wakeup_event(ckdev->dev, 0);
268266

269-
if (mkbp_event_type == EC_MKBP_EVENT_BUTTON) {
267+
if (ckdev->ec->event_data.event_type == EC_MKBP_EVENT_BUTTON) {
270268
val = get_unaligned_le32(
271269
&ckdev->ec->event_data.data.buttons);
272270
ev_type = EV_KEY;

0 commit comments

Comments
 (0)