Input: sa1111ps2 - use disable_irq_nosync() in irq handlers
authorBen Nizette <bn@niasdigital.com>
Sat, 18 Apr 2009 03:35:57 +0000 (20:35 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 18 Apr 2009 03:41:54 +0000 (20:41 -0700)
disable_irq() waits for all running handlers to complete before
returning.  As such, if it's used to disable an interrupt from
that interrupt's handler it will deadlock.  This replaces the
dangerous instances with the _nosync() variant which doesn't have
this problem.

Signed-off-by: Ben Nizette <bn@niasdigital.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/serio/sa1111ps2.c

index 57953c0eb82fa8302b23eb84edf9e6507e5915b3..f412c69478a8fe982471c86065644dfc478a9537 100644 (file)
@@ -77,7 +77,7 @@ static irqreturn_t ps2_txint(int irq, void *dev_id)
        spin_lock(&ps2if->lock);
        status = sa1111_readl(ps2if->base + SA1111_PS2STAT);
        if (ps2if->head == ps2if->tail) {
-               disable_irq(irq);
+               disable_irq_nosync(irq);
                /* done */
        } else if (status & PS2STAT_TXE) {
                sa1111_writel(ps2if->buf[ps2if->tail], ps2if->base + SA1111_PS2DATA);