From: Grazvydas Ignotas Date: Sun, 14 Sep 2014 15:07:30 +0000 (+0300) Subject: Input: ads7846: avoid a deadlock X-Git-Tag: sz_173~89 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a86414d402959803aae2576377ce1b158bc41ef;p=pandora-kernel.git Input: ads7846: avoid a deadlock problem caused by earlier hack (2ed0bced). ads7846_stop() does disable_irq(), which waits for ads7846_irq() to finish, but ads7846_irq() takes the same lock.. There is no need for that check as irq funcs are refcounted. --- diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index 5e4858698754..53aabc7db168 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c @@ -904,10 +904,7 @@ static irqreturn_t ads7846_irq(int irq, void *handle) dev_vdbg(&ts->spi->dev, "UP\n"); } - mutex_lock(&ts->lock); - if (!ts->stopped) - enable_irq(ts->spi->irq); - mutex_unlock(&ts->lock); + enable_irq(ts->spi->irq); return IRQ_HANDLED; }