]> git.baikalelectronics.ru Git - kernel.git/commit
Input: synaptics-rmi4 - simplify data read in rmi_f54_work
authorLucas Stach <l.stach@pengutronix.de>
Mon, 4 Nov 2019 23:59:38 +0000 (15:59 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 5 Nov 2019 00:12:52 +0000 (16:12 -0800)
commiteb61c31cc0e76dea717f1a2bc9399f748808327c
tree6402852e3462b1ea4e30d10a1c25043b3f4f27df
parent25f709af312ef66e434b42586b82fdf31af1f544
Input: synaptics-rmi4 - simplify data read in rmi_f54_work

The body of the for loop is only ever run once as the second standard_report
element is never changed from its initial zero init, so the loop condition is
never satisfies after the first run. Equally the start member of the first
element is never changed from 0, so the index offset is always a constant 0.

Remove this needless obfuscation of the code and write it in a straight
forward manner.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Link: https://lore.kernel.org/r/20191104114454.10500-3-l.stach@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/rmi4/rmi_f54.c