diff options
| author | Dmitry Torokhov <[email protected]> | 2020-10-18 18:42:32 -0700 |
|---|---|---|
| committer | Dmitry Torokhov <[email protected]> | 2020-10-18 18:42:32 -0700 |
| commit | bb0bc0cfeabc0d6865865e8d3a601bea6711f951 (patch) | |
| tree | f5321f28b6ea9c557316980226c6139a45a3aec9 /drivers/input/input-mt.c | |
| parent | 5fc27b098dafb8e30794a9db0705074c7d766179 (diff) | |
| parent | 8a30c6eb29e036f729b4dd6982462ca15d062087 (diff) | |
Merge branch 'next' into for-linus
Prepare input updates for 5.10 merge window.
Diffstat (limited to 'drivers/input/input-mt.c')
| -rw-r--r-- | drivers/input/input-mt.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/input/input-mt.c b/drivers/input/input-mt.c index f699538bdac4..44fe6f2f063c 100644 --- a/drivers/input/input-mt.c +++ b/drivers/input/input-mt.c @@ -323,11 +323,14 @@ static int adjust_dual(int *begin, int step, int *end, int eq, int mu) p = begin + step; s = p == end ? f + 1 : *p; - for (; p != end; p += step) - if (*p < f) - s = f, f = *p; - else if (*p < s) + for (; p != end; p += step) { + if (*p < f) { + s = f; + f = *p; + } else if (*p < s) { s = *p; + } + } c = (f + s + 1) / 2; if (c == 0 || (c > mu && (!eq || mu > 0))) |