Skip to content

Commit

Permalink
Input: i8042 - use synchronize_irq() instead of synchronize_sched()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dmitry Torokhov committed Jan 21, 2008
1 parent f0b92b9 commit a8399c5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion drivers/input/serio/i8042.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit a8399c5

Please sign in to comment.