tty/serial: atmel: enforce tasklet init and termination sequences
authorNicolas Ferre <nicolas.ferre@atmel.com>
Sun, 26 Jun 2016 07:44:49 +0000 (09:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 26 Jun 2016 17:57:13 +0000 (10:57 -0700)
commit98f2082c3ac4042189723c120553310700b583bb
tree8b1c5815105f03574a14f36be1f44c6ddbda40d6
parent5fd2b6ee7a319e0955acff96948fae57321b1f5a
tty/serial: atmel: enforce tasklet init and termination sequences

As some race conditions are identified in the termination process of tasklets,
enforce the atmel_shutdown() sequence. This way we make sure that no new
tasklets or software timer are scheduled during shutdown process.

An atomic flag is positioned to give this information throughout the code.

We also remove tasklet_disable() calls that were leading to deadlocks while
stopping the driver. A simpler init/kill sequence is used.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/atmel_serial.c