]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
This patch fixes "scheduling while atomic" bug when driver is unloaded.
authorRoman Tereshonkov <roman.tereshonkov@nokia.com>
Tue, 10 Jun 2008 12:16:36 +0000 (15:16 +0300)
committerTony Lindgren <tony@atomide.com>
Tue, 10 Jun 2008 21:01:58 +0000 (14:01 -0700)
Signed-off-by: Roman Tereshonkov <roman.tereshonkov@nokia.com>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/input/touchscreen/tsc2005.c

index fa017996be78a95457de72e18774cf5cf5c6c283..408caf007d7b8d5cd9683b873c9e86b888b8d246 100644 (file)
@@ -661,11 +661,10 @@ err1:
 static int __devexit tsc2005_remove(struct spi_device *spi)
 {
        struct tsc2005 *ts = dev_get_drvdata(&spi->dev);
-       unsigned long flags;
 
-       spin_lock_irqsave(&ts->lock, flags);
+       mutex_lock(&ts->mutex);
        tsc2005_disable(ts);
-       spin_unlock_irqrestore(&ts->lock, flags);
+       mutex_unlock(&ts->mutex);
 
        device_remove_file(&ts->spi->dev, &dev_attr_disable_ts);
        device_remove_file(&ts->spi->dev, &dev_attr_pen_down);