| .. | .. |
|---|
| 1263 | 1263 | { |
|---|
| 1264 | 1264 | struct uart_cpm_port *pinfo = &cpm_uart_ports[co->index]; |
|---|
| 1265 | 1265 | unsigned long flags; |
|---|
| 1266 | | - int nolock = oops_in_progress; |
|---|
| 1267 | 1266 | |
|---|
| 1268 | | - if (unlikely(nolock)) { |
|---|
| 1267 | + if (unlikely(oops_in_progress)) { |
|---|
| 1269 | 1268 | local_irq_save(flags); |
|---|
| 1270 | | - } else { |
|---|
| 1271 | | - spin_lock_irqsave(&pinfo->port.lock, flags); |
|---|
| 1272 | | - } |
|---|
| 1273 | | - |
|---|
| 1274 | | - cpm_uart_early_write(pinfo, s, count, true); |
|---|
| 1275 | | - |
|---|
| 1276 | | - if (unlikely(nolock)) { |
|---|
| 1269 | + cpm_uart_early_write(pinfo, s, count, true); |
|---|
| 1277 | 1270 | local_irq_restore(flags); |
|---|
| 1278 | 1271 | } else { |
|---|
| 1272 | + spin_lock_irqsave(&pinfo->port.lock, flags); |
|---|
| 1273 | + cpm_uart_early_write(pinfo, s, count, true); |
|---|
| 1279 | 1274 | spin_unlock_irqrestore(&pinfo->port.lock, flags); |
|---|
| 1280 | 1275 | } |
|---|
| 1281 | 1276 | } |
|---|