OSDN Git Service

Input: i8042 - use synchronize_irq() instead of synchronize_sched()
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Sun, 4 Nov 2007 04:44:31 +0000 (00:44 -0400)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 21 Jan 2008 06:11:07 +0000 (01:11 -0500)
RT guys advised me that in their kernels synchronize_sched() will not
work to ensure that all IRQ handlers run to their completion and that
synchronize_irq() should be used instead.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/serio/i8042.c

index 1a0cea3..13da06f 100644 (file)
@@ -280,7 +280,14 @@ static void i8042_stop(struct serio *serio)
        struct i8042_port *port = serio->port_data;
 
        port->exists = 0;
-       synchronize_sched();
+
+       /*
+        * We synchronize with both AUX and KBD IRQs because there is
+        * a (very unlikely) chance that AUX IRQ is raised for KBD port
+        * and vice versa.
+        */
+       synchronize_irq(I8042_AUX_IRQ);
+       synchronize_irq(I8042_KBD_IRQ);
        port->serio = NULL;
 }