aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rwxr-xr-x[-rw-r--r--]drivers/serial/cpm_uart/cpm_uart_core.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c
index 43f58dc69fc9..d389a76b4afb 100644..100755
--- a/drivers/serial/cpm_uart/cpm_uart_core.c
+++ b/drivers/serial/cpm_uart/cpm_uart_core.c
@@ -969,6 +969,14 @@ static void cpm_uart_console_write(struct console *co, const char *s,
969 unsigned int i; 969 unsigned int i;
970 cbd_t __iomem *bdp, *bdbase; 970 cbd_t __iomem *bdp, *bdbase;
971 unsigned char *cp; 971 unsigned char *cp;
972 unsigned long flags;
973 int nolock = oops_in_progress;
974
975 if (unlikely(nolock)) {
976 local_irq_save(flags);
977 } else {
978 spin_lock_irqsave(&pinfo->port.lock, flags);
979 }
972 980
973 /* Get the address of the host memory buffer. 981 /* Get the address of the host memory buffer.
974 */ 982 */
@@ -1030,6 +1038,12 @@ static void cpm_uart_console_write(struct console *co, const char *s,
1030 ; 1038 ;
1031 1039
1032 pinfo->tx_cur = bdp; 1040 pinfo->tx_cur = bdp;
1041
1042 if (unlikely(nolock)) {
1043 local_irq_restore(flags);
1044 } else {
1045 spin_unlock_irqrestore(&pinfo->port.lock, flags);
1046 }
1033} 1047}
1034 1048
1035 1049