Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: wdt87xx_i2c - replace mdelay() with msleep() in wdt87xx_resume()

wdt87xx_resume() is never called in atomic context. It calls mdelay() to
busily wait, which is not necessary. mdelay() can be replaced with
msleep().

This is found by a static analysis tool named DCNS written by myself.

Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Jia-Ju Bai and committed by
Dmitry Torokhov
e58650b5 6c6212aa

+1 -1
+1 -1
drivers/input/touchscreen/wdt87xx_i2c.c
··· 1142 1142 * The chip may have been reset while system is resuming, 1143 1143 * give it some time to settle. 1144 1144 */ 1145 - mdelay(100); 1145 + msleep(100); 1146 1146 1147 1147 error = wdt87xx_send_command(client, VND_CMD_START, 0); 1148 1148 if (error)