Commit cade3580 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Greg Kroah-Hartman

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: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2e94d5ae
...@@ -2117,9 +2117,8 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport) ...@@ -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--) for (tries = 3; !ops->tx_empty(uport) && tries; tries--)
msleep(10); msleep(10);
if (!tries) if (!tries)
dev_err(uport->dev, "%s%d: Unable to drain transmitter\n", dev_err(uport->dev, "%s: Unable to drain transmitter\n",
drv->dev_name, uport->name);
drv->tty_driver->name_base + uport->line);
ops->shutdown(uport); ops->shutdown(uport);
} }
...@@ -2248,11 +2247,10 @@ uart_report_port(struct uart_driver *drv, struct uart_port *port) ...@@ -2248,11 +2247,10 @@ uart_report_port(struct uart_driver *drv, struct uart_port *port)
break; 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 ? dev_name(port->dev) : "",
port->dev ? ": " : "", port->dev ? ": " : "",
drv->dev_name, port->name,
drv->tty_driver->name_base + port->line,
address, port->irq, port->uartclk / 16, uart_type(port)); address, port->irq, port->uartclk / 16, uart_type(port));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment