Skip to content

Commit

Permalink
Input: ads7846 - fix unsafe disable_irq
Browse files Browse the repository at this point in the history
The use of disable_irq inside the handler for the interrupt being
disabled has always been dangerous.  disable_irq should wait for that
handler to complete before returning -> deadlock.

For some reason this wasn't actually the case until 3aa551c was merged
but since this time, the ads7846 driver has deadlocked the system on
first interrupt.

Convert the driver to use the handler-safe _nosync variant.

Signed-off-by: Ben Nizette <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
  • Loading branch information
Ben Nizette authored and dtor committed Apr 16, 2009
1 parent 180deb5 commit 3f3e7c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/touchscreen/ads7846.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ static irqreturn_t ads7846_irq(int irq, void *handle)
* that here. (The "generic irq" framework may help...)
*/
ts->irq_disabled = 1;
disable_irq(ts->spi->irq);
disable_irq_nosync(ts->spi->irq);
ts->pending = 1;
hrtimer_start(&ts->timer, ktime_set(0, TS_POLL_DELAY),
HRTIMER_MODE_REL);
Expand Down

0 comments on commit 3f3e7c6

Please sign in to comment.