]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Input: ilitek_ts_i2c - switch mdelay() to fsleep()
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 19 Dec 2025 05:41:04 +0000 (21:41 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 19 Dec 2025 05:46:55 +0000 (21:46 -0800)
The mdelay() is called in sleeping context and it should be OK to delay
slightly longer than requested, so switch the code to use fsleep() to
avoid spinning.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/ilitek_ts_i2c.c

index 10e5530d6a5d02670398e7e4614905d4a9b19600..0706443792ba5ddba5e9483d0fdf6fa24f58692b 100644 (file)
@@ -122,7 +122,7 @@ static int ilitek_i2c_write_and_read(struct ilitek_ts_data *ts,
                                return error;
                }
                if (delay > 0)
-                       mdelay(delay);
+                       fsleep(delay * 1000);
 
                if (read_len > 0) {
                        error = i2c_transfer(client->adapter, msgs + 1, 1);