diff options
author | Joe Perches <joe@perches.com> | 2020-08-25 19:06:59 +0200 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2020-08-25 19:26:05 +0200 |
commit | 9b5fbad1dcee0607300d08f888c71c8ef97a06a0 (patch) | |
tree | b09ace320f5f082541a1e26d6dbf07e8ce2d9146 /drivers | |
parent | Input: exc3000 - add support to query model and fw_version (diff) | |
download | linux-9b5fbad1dcee0607300d08f888c71c8ef97a06a0.tar.xz linux-9b5fbad1dcee0607300d08f888c71c8ef97a06a0.zip |
Input: MT - avoid comma separated statements
Use semicolons and braces.
Signed-off-by: Joe Perches <joe@perches.com>
Link: https://lore.kernel.org/r/02cb394f8c305473c1a783a5ea8425de79fe0ec1.1598331149.git.joe@perches.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers')
-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))) |