summaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen/ili210x.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-06-24 21:36:11 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2024-06-24 21:36:11 +0300
commit55027e689933ba2e64f3d245fb1ff185b3e7fc81 (patch)
treec9644e3439b0ca4d26d83aa78413d7ab0e79de27 /drivers/input/touchscreen/ili210x.c
parent626737a5791b59df5c4d1365c4dcfc9b0d70affe (diff)
parent7c7b1be19b228b450c2945ec379d7fc6bfef9852 (diff)
downloadlinux-55027e689933ba2e64f3d245fb1ff185b3e7fc81.tar.xz
Merge tag 'input-for-v6.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input fixes from Dmitry Torokhov: - fixes for ili210x and elantech drivers - new products IDs added to xpad controller driver - a tweak to i8042 driver to always keep keyboard in Ayaneo Kun handheld in raw mode - populated "id_table" in ads7846 touchscreen driver to make sure non-OF instantiated devices can properly determine the model data. * tag 'input-for-v6.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: ads7846 - use spi_device_id table Input: xpad - add support for ASUS ROG RAIKIRI PRO Input: ili210x - fix ili251x_read_touch_data() return value Input: i8042 - add Ayaneo Kun to i8042 quirk table Input: elantech - fix touchpad state on resume for Lenovo N24
Diffstat (limited to 'drivers/input/touchscreen/ili210x.c')
-rw-r--r--drivers/input/touchscreen/ili210x.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/touchscreen/ili210x.c b/drivers/input/touchscreen/ili210x.c
index 31ffdc2a93f3..79bdb2b10949 100644
--- a/drivers/input/touchscreen/ili210x.c
+++ b/drivers/input/touchscreen/ili210x.c
@@ -261,8 +261,8 @@ static int ili251x_read_touch_data(struct i2c_client *client, u8 *data)
if (!error && data[0] == 2) {
error = i2c_master_recv(client, data + ILI251X_DATA_SIZE1,
ILI251X_DATA_SIZE2);
- if (error >= 0 && error != ILI251X_DATA_SIZE2)
- error = -EIO;
+ if (error >= 0)
+ error = error == ILI251X_DATA_SIZE2 ? 0 : -EIO;
}
return error;