]> 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)
commitb68b71054ca956b3333b0d60a9e3267aa7196f56
tree6402852e3462b1ea4e30d10a1c25043b3f4f27df
parentaad8fedc8d74444e489a72f999f4c276a9a51632
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