serial: mcf: don't take spinlocks in already protected functions
authorYury Georgievskiy <ygeorgie@gmail.com>
Tue, 20 Jul 2010 22:26:50 +0000 (15:26 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 10 Aug 2010 20:47:45 +0000 (13:47 -0700)
commit0ac8382e9cfdd723445692fc97aaa4643929750d
treee42c65488ea8d839c39441dce939d21ba6d60ae6
parent1b6331848b69d1ed165a6bdc75c4046d68767563
serial: mcf: don't take spinlocks in already protected functions

Don't take the port spinlock in uart functions where the serial core
already takes care of locking/unlocking them.

The code would actually lock up on architectures where spinlocks are
implemented.

Also protect calling mcf_rx_chars/mcf_tx_chars in the interrupt handler by
the port spinlock and use IRQ_RETVAL to return from isr.

[akpm@linux-foundation.org: make irq-handler return value more explicit]
Signed-off-by: Yury Georgievskiy <ygeorgie@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Acked-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/serial/mcf.c