Skip to content

Commit 0a82948

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). Signed-off-by: Enrico Weigelt <info@metux.net>
1 parent de03eaa commit 0a82948

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
@@ -260,7 +260,7 @@ static void cpm_uart_int_rx(struct uart_port *port)
260260
* later, which will be the next rx-interrupt or a timeout
261261
*/
262262
if (tty_buffer_request_room(tport, i) < i) {
263-
printk(KERN_WARNING "No room in flip buffer\n");
263+
dev_warn(port->dev, "No room in flip buffer\n");
264264
return;
265265
}
266266

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

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

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)