mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-18 16:44:27 +08:00
serial: 8250_port: Use dev_*() instead of pr_*()
Convert pr_*() calls to dev_*() ones. We have a port, we should use it. Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20200217114016.49856-5-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
567a0e17f7
commit
21680a6dcb
@ -1318,8 +1318,8 @@ out_lock:
|
|||||||
fintek_8250_probe(up);
|
fintek_8250_probe(up);
|
||||||
|
|
||||||
if (up->capabilities != old_capabilities) {
|
if (up->capabilities != old_capabilities) {
|
||||||
pr_warn("%s: detected caps %08x should be %08x\n",
|
dev_warn(port->dev, "detected caps %08x should be %08x\n",
|
||||||
port->name, old_capabilities, up->capabilities);
|
old_capabilities, up->capabilities);
|
||||||
}
|
}
|
||||||
out:
|
out:
|
||||||
DEBUG_AUTOCONF("iir=%d ", scratch);
|
DEBUG_AUTOCONF("iir=%d ", scratch);
|
||||||
@ -1683,7 +1683,7 @@ void serial8250_read_char(struct uart_8250_port *up, unsigned char lsr)
|
|||||||
lsr &= port->read_status_mask;
|
lsr &= port->read_status_mask;
|
||||||
|
|
||||||
if (lsr & UART_LSR_BI) {
|
if (lsr & UART_LSR_BI) {
|
||||||
pr_debug("%s: handling break\n", __func__);
|
dev_dbg(port->dev, "handling break\n");
|
||||||
flag = TTY_BREAK;
|
flag = TTY_BREAK;
|
||||||
} else if (lsr & UART_LSR_PE)
|
} else if (lsr & UART_LSR_PE)
|
||||||
flag = TTY_PARITY;
|
flag = TTY_PARITY;
|
||||||
@ -2134,7 +2134,7 @@ int serial8250_do_startup(struct uart_port *port)
|
|||||||
*/
|
*/
|
||||||
if (!(port->flags & UPF_BUGGY_UART) &&
|
if (!(port->flags & UPF_BUGGY_UART) &&
|
||||||
(serial_port_in(port, UART_LSR) == 0xff)) {
|
(serial_port_in(port, UART_LSR) == 0xff)) {
|
||||||
pr_info_ratelimited("%s: LSR safety check engaged!\n", port->name);
|
dev_info_ratelimited(port->dev, "LSR safety check engaged!\n");
|
||||||
retval = -ENODEV;
|
retval = -ENODEV;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
@ -2166,8 +2166,7 @@ int serial8250_do_startup(struct uart_port *port)
|
|||||||
(port->type == PORT_ALTR_16550_F128)) && (port->fifosize > 1)) {
|
(port->type == PORT_ALTR_16550_F128)) && (port->fifosize > 1)) {
|
||||||
/* Bounds checking of TX threshold (valid 0 to fifosize-2) */
|
/* Bounds checking of TX threshold (valid 0 to fifosize-2) */
|
||||||
if ((up->tx_loadsz < 2) || (up->tx_loadsz > port->fifosize)) {
|
if ((up->tx_loadsz < 2) || (up->tx_loadsz > port->fifosize)) {
|
||||||
pr_err("%s TX FIFO Threshold errors, skipping\n",
|
dev_err(port->dev, "TX FIFO Threshold errors, skipping\n");
|
||||||
port->name);
|
|
||||||
} else {
|
} else {
|
||||||
serial_port_out(port, UART_ALTR_AFR,
|
serial_port_out(port, UART_ALTR_AFR,
|
||||||
UART_ALTR_EN_TXFIFO_LW);
|
UART_ALTR_EN_TXFIFO_LW);
|
||||||
@ -2264,8 +2263,7 @@ int serial8250_do_startup(struct uart_port *port)
|
|||||||
if (lsr & UART_LSR_TEMT && iir & UART_IIR_NO_INT) {
|
if (lsr & UART_LSR_TEMT && iir & UART_IIR_NO_INT) {
|
||||||
if (!(up->bugs & UART_BUG_TXEN)) {
|
if (!(up->bugs & UART_BUG_TXEN)) {
|
||||||
up->bugs |= UART_BUG_TXEN;
|
up->bugs |= UART_BUG_TXEN;
|
||||||
pr_debug("%s - enabling bad tx status workarounds\n",
|
dev_dbg(port->dev, "enabling bad tx status workarounds\n");
|
||||||
port->name);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
up->bugs &= ~UART_BUG_TXEN;
|
up->bugs &= ~UART_BUG_TXEN;
|
||||||
@ -2292,8 +2290,7 @@ dont_test_tx_en:
|
|||||||
if (up->dma) {
|
if (up->dma) {
|
||||||
retval = serial8250_request_dma(up);
|
retval = serial8250_request_dma(up);
|
||||||
if (retval) {
|
if (retval) {
|
||||||
pr_warn_ratelimited("%s - failed to request DMA\n",
|
dev_warn_ratelimited(port->dev, "failed to request DMA\n");
|
||||||
port->name);
|
|
||||||
up->dma = NULL;
|
up->dma = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user