Skip to content

Commit 115e7a3

Browse files
committed
drivers: tty: serial: cpm_uart: use dev_err()/dev_warn() instead of printk()
Using dev_err()/dev_warn() instead of printk() for more consistent output. (prints device name, etc). Reviewed-by: Christophe Leroy <[email protected]> Signed-off-by: Enrico Weigelt <[email protected]>
1 parent f06fd7e commit 115e7a3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

drivers/tty/serial/cpm_uart/cpm_uart_core.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ static void cpm_uart_int_rx(struct uart_port *port)
265265
* later, which will be the next rx-interrupt or a timeout
266266
*/
267267
if (tty_buffer_request_room(tport, i) < i) {
268-
printk(KERN_WARNING "No room in flip buffer\n");
268+
dev_warn(port->dev, "No room in flip buffer\n");
269269
return;
270270
}
271271

@@ -1155,7 +1155,7 @@ static int cpm_uart_init_port(struct device_node *np,
11551155
if (!pinfo->clk) {
11561156
data = of_get_property(np, "fsl,cpm-brg", &len);
11571157
if (!data || len != 4) {
1158-
printk(KERN_ERR "CPM UART %pOFn has no/invalid "
1158+
dev_err(port->dev, "CPM UART %pOFn has no/invalid "
11591159
"fsl,cpm-brg property.\n", np);
11601160
return -EINVAL;
11611161
}
@@ -1164,7 +1164,7 @@ static int cpm_uart_init_port(struct device_node *np,
11641164

11651165
data = of_get_property(np, "fsl,cpm-command", &len);
11661166
if (!data || len != 4) {
1167-
printk(KERN_ERR "CPM UART %pOFn has no/invalid "
1167+
dev_err(port->dev, "CPM UART %pOFn has no/invalid "
11681168
"fsl,cpm-command property.\n", np);
11691169
return -EINVAL;
11701170
}

drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ void __iomem *cpm_uart_map_pram(struct uart_cpm_port *port,
6767
return pram;
6868

6969
if (len != 2) {
70-
printk(KERN_WARNING "cpm_uart[%d]: device tree references "
70+
dev_warn(port->dev, "cpm_uart[%d]: device tree references "
7171
"SMC pram, using boot loader/wrapper pram mapping. "
7272
"Please fix your device tree to reference the pram "
7373
"base register instead.\n",

0 commit comments

Comments
 (0)