From: Juha Yrjola Date: Tue, 14 Feb 2006 15:23:36 +0000 (+0200) Subject: ads7846: make the suspend function sleep instead of busy poll X-Git-Tag: v2.6.16-omap1~59 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=071a568a4d89c0bff7dd5e6a4906066be317db2c;p=linux-2.6-omap-h63xx.git ads7846: make the suspend function sleep instead of busy poll ads7846_suspend was busily polling for a couple of variables, which never get a chance to change state unless kernel pre-emption is enabled. Use msleep instead. Signed-off-by: Juha Yrjölä --- diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index 0aedb93c4e0..6da83482f5b 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c @@ -443,7 +443,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); } }