Input: st1232 - do not read more bytes than needed
authorGeert Uytterhoeven <geert+renesas@glider.be>
Sat, 2 Jan 2021 06:13:13 +0000 (22:13 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 2 Jan 2021 06:19:02 +0000 (22:19 -0800)
commitb999dbea06b9874c7724a410f47a6bac1e219e37
treeb79b155e62a1a7c275c65035f500e1ac3e439e25
parent928eedf013b25fcaeb6aef2ad721ed92c2e8bc66
Input: st1232 - do not read more bytes than needed

st1232_ts_read_data() already reads ts->read_buf_len bytes (8 or 20
bytes) from the touchscreen controller.  This was fine when it was used
to read touch point coordinates only, but is overkill for reading the
touchscreen resolution, which just needs 3 bytes.

Optimize transfers by passing the wanted number of bytes.

Fixes: 3a54a215410b1650 ("Input: st1232 - add support resolution reading")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20201229162601.2154566-3-geert+renesas@glider.be
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/st1232.c