summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2017-03-31 21:35:18 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-04-08 18:51:57 +0200
commitcade3580f79aeba0048d1dc4efd754786713c2c3 (patch)
tree810b9339b62bbb136584e54b43b474b598098915 /drivers
parent2e94d5ae5da1d2e798045a53b5e234a42b090908 (diff)
serial: core: Re-use struct uart_port {name} field
Since we have port name stored in struct uart_port, we better to use that one instead of open coding. This will make it one place source for easier maintenance or modifications. While here, replace printk(KERN_INFO ) by pr_info(). It seems last printk() call in serial_core.c. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/tty/serial/serial_core.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index f5572e28d16a..0f45b7884a2c 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -2117,9 +2117,8 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport)
for (tries = 3; !ops->tx_empty(uport) && tries; tries--)
msleep(10);
if (!tries)
- dev_err(uport->dev, "%s%d: Unable to drain transmitter\n",
- drv->dev_name,
- drv->tty_driver->name_base + uport->line);
+ dev_err(uport->dev, "%s: Unable to drain transmitter\n",
+ uport->name);
ops->shutdown(uport);
}
@@ -2248,11 +2247,10 @@ uart_report_port(struct uart_driver *drv, struct uart_port *port)
break;
}
- printk(KERN_INFO "%s%s%s%d at %s (irq = %d, base_baud = %d) is a %s\n",
+ pr_info("%s%s%s at %s (irq = %d, base_baud = %d) is a %s\n",
port->dev ? dev_name(port->dev) : "",
port->dev ? ": " : "",
- drv->dev_name,
- drv->tty_driver->name_base + port->line,
+ port->name,
address, port->irq, port->uartclk / 16, uart_type(port));
}