Skip to content

Commit c4febb9

Browse files
Juha YrjolaDmitry Torokhov
authored andcommitted
Input: ads7846 - use msleep() instead of udelay() in suspend
Sometimes a polling loop had a hard time changing state without pre-emption enabled. Use msleep instead, it's better anyway. Signed-off-by: Juha Yrjola <juha.yrjola@nokia.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
1 parent 0b7018a commit c4febb9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/input/touchscreen/ads7846.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ ads7846_suspend(struct spi_device *spi, pm_message_t message)
449449

450450
while (ts->pendown || ts->pending) {
451451
spin_unlock_irqrestore(&ts->lock, flags);
452-
udelay(10);
452+
msleep(1);
453453
spin_lock_irqsave(&ts->lock, flags);
454454
}
455455
}

0 commit comments

Comments
 (0)