diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2023-06-26 15:18:13 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2023-06-26 15:18:13 -0700 |
commit | bf4ed21778f2920ca91a32fd3a1e1130e843e98f (patch) | |
tree | efb126e6d74ff3ff83913406de136305050c8a80 /drivers/input/input.c | |
parent | feee70f4568650cf44c573488798ffc0a2faeea3 (diff) | |
parent | 8c9cce9cb81b5fdc6e66bf3f129727b89e8daab7 (diff) |
Merge branch 'next' into for-linus
Prepare input updates for 6.5 merge window.
Diffstat (limited to 'drivers/input/input.c')
-rw-r--r-- | drivers/input/input.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c index 641eb86f276e..8c5fdb0f858a 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -190,6 +190,7 @@ static int input_handle_abs_event(struct input_dev *dev, unsigned int code, int *pval) { struct input_mt *mt = dev->mt; + bool is_new_slot = false; bool is_mt_event; int *pold; @@ -210,6 +211,7 @@ static int input_handle_abs_event(struct input_dev *dev, pold = &dev->absinfo[code].value; } else if (mt) { pold = &mt->slots[mt->slot].abs[code - ABS_MT_FIRST]; + is_new_slot = mt->slot != dev->absinfo[ABS_MT_SLOT].value; } else { /* * Bypass filtering for multi-touch events when @@ -228,8 +230,8 @@ static int input_handle_abs_event(struct input_dev *dev, } /* Flush pending "slot" event */ - if (is_mt_event && mt && mt->slot != input_abs_get_val(dev, ABS_MT_SLOT)) { - input_abs_set_val(dev, ABS_MT_SLOT, mt->slot); + if (is_new_slot) { + dev->absinfo[ABS_MT_SLOT].value = mt->slot; return INPUT_PASS_TO_HANDLERS | INPUT_SLOT; } |