*/
if (uport->flags & UPF_SPD_MASK) {
char buf[64];
- printk(KERN_NOTICE
- "%s sets custom speed on %s. This "
- "is deprecated.\n", current->comm,
- tty_name(port->tty, buf));
+
+ dev_notice(uport->dev,
+ "%s sets custom speed on %s. This is deprecated.\n",
+ current->comm,
+ tty_name(port->tty, buf));
}
uart_change_speed(tty, state, NULL);
}
for (tries = 3; !ops->tx_empty(uport) && tries; tries--)
msleep(10);
if (!tries)
- printk(KERN_ERR "%s%s%s%d: Unable to drain "
- "transmitter\n",
- uport->dev ? dev_name(uport->dev) : "",
- uport->dev ? ": " : "",
- drv->dev_name,
- drv->tty_driver->name_base + uport->line);
+ dev_err(uport->dev, "%s%d: Unable to drain transmitter\n",
+ drv->dev_name,
+ drv->tty_driver->name_base + uport->line);
if (console_suspend_enabled || !uart_console(uport))
ops->shutdown(uport);
break;
}
- printk(KERN_INFO "%s%s%s%d at %s (irq = %d, base_baud = %d) is a %s\n",
- port->dev ? dev_name(port->dev) : "",
- port->dev ? ": " : "",
+ dev_info(port->dev, "%s%d at %s (irq = %d, base_baud = %d) is a %s\n",
drv->dev_name,
drv->tty_driver->name_base + port->line,
address, port->irq, port->uartclk / 16, uart_type(port));
if (likely(!IS_ERR(tty_dev))) {
device_set_wakeup_capable(tty_dev, 1);
} else {
- printk(KERN_ERR "Cannot register tty device on line %d\n",
+ dev_err(uport->dev, "Cannot register tty device on line %d\n",
uport->line);
}
BUG_ON(in_interrupt());
if (state->uart_port != uport)
- printk(KERN_ALERT "Removing wrong port: %p != %p\n",
+ dev_alert(uport->dev, "Removing wrong port: %p != %p\n",
state->uart_port, uport);
mutex_lock(&port_mutex);