diff options
| author | 2020-10-18 18:42:32 -0700 | |
|---|---|---|
| committer | 2020-10-18 18:42:32 -0700 | |
| commit | bb0bc0cfeabc0d6865865e8d3a601bea6711f951 (patch) | |
| tree | f5321f28b6ea9c557316980226c6139a45a3aec9 /drivers/input/input-mt.c | |
| parent | Input: i8042 - add nopnp quirk for Acer Aspire 5 A515 (diff) | |
| parent | Input: Add MAINTAINERS entry for SiS i2c touch input driver (diff) | |
| download | linux-dev-bb0bc0cfeabc0d6865865e8d3a601bea6711f951.tar.xz linux-dev-bb0bc0cfeabc0d6865865e8d3a601bea6711f951.zip | |
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))) |
