Skip to content

Commit

Permalink
Input: ads7846 - use msleep() instead of udelay() in suspend
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Juha Yrjola authored and Dmitry Torokhov committed Apr 12, 2006
1 parent 0b7018a commit c4febb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/touchscreen/ads7846.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ ads7846_suspend(struct spi_device *spi, pm_message_t message)

while (ts->pendown || ts->pending) {
spin_unlock_irqrestore(&ts->lock, flags);
udelay(10);
msleep(1);
spin_lock_irqsave(&ts->lock, flags);
}
}
Expand Down

0 comments on commit c4febb9

Please sign in to comment.