]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/input/touchscreen/tsc2005.c
This patch fixes "scheduling while atomic" bug when driver is unloaded.
[linux-2.6-omap-h63xx.git] / 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);