serial: samsung: don't check config for every character

The s3c24xx_serial_console_putchar() is _only_ ever used by
s3c24xx_serial_console_write() and is called in a loop (indirectly
through uart_console_write()). There's no reason to call
s3c24xx_port_configured() for every iteration through the loop. Move
it outside the loop.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Doug Anderson and committed by
Greg Kroah-Hartman
ab88c8dc bb7f09ba

+6 -5
+6 -5
drivers/tty/serial/samsung.c
··· 1464 1464 s3c24xx_serial_console_putchar(struct uart_port *port, int ch) 1465 1465 { 1466 1466 unsigned int ufcon = rd_regl(port, S3C2410_UFCON); 1467 - unsigned int ucon = rd_regl(port, S3C2410_UCON); 1468 - 1469 - /* not possible to xmit on unconfigured port */ 1470 - if (!s3c24xx_port_configured(ucon)) 1471 - return; 1472 1467 1473 1468 while (!s3c24xx_serial_console_txrdy(port, ufcon)) 1474 1469 barrier(); ··· 1474 1479 s3c24xx_serial_console_write(struct console *co, const char *s, 1475 1480 unsigned int count) 1476 1481 { 1482 + unsigned int ucon = rd_regl(cons_uart, S3C2410_UCON); 1483 + 1484 + /* not possible to xmit on unconfigured port */ 1485 + if (!s3c24xx_port_configured(ucon)) 1486 + return; 1487 + 1477 1488 uart_console_write(cons_uart, s, count, s3c24xx_serial_console_putchar); 1478 1489 } 1479 1490