]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ads7846: make the suspend function sleep instead of busy poll
authorJuha Yrjola <juha.yrjola@nokia.com>
Tue, 14 Feb 2006 15:23:36 +0000 (17:23 +0200)
committerJuha Yrjola <juha.yrjola@nokia.com>
Tue, 14 Feb 2006 15:23:36 +0000 (17:23 +0200)
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ä <juha.yrjola@nokia.com>
drivers/input/touchscreen/ads7846.c

index 0aedb93c4e044392b6861e3520dc1b1333c5d3b2..6da83482f5bf082eb153cf503e2e44a826c0a0e6 100644 (file)
@@ -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);
                }
        }