From 33d176e7aae335237fc9da55bc340c7c6ae627c4 Mon Sep 17 00:00:00 2001 From: Russell King Date: Sat, 24 Jan 2004 21:54:48 +0000 Subject: [PATCH] [SERIAL] Use tty_name() when printing the tty name. --- drivers/serial/serial_core.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c index 3f403b5e5816b..a78f0521e4c33 100644 --- a/drivers/serial/serial_core.c +++ b/drivers/serial/serial_core.c @@ -832,13 +832,17 @@ uart_set_info(struct uart_state *state, struct serial_struct *newinfo) if (state->info->flags & UIF_INITIALIZED) { if (((old_flags ^ port->flags) & UPF_SPD_MASK) || old_custom_divisor != port->custom_divisor) { - /* If they're setting up a custom divisor or speed, + /* + * If they're setting up a custom divisor or speed, * instead of clearing it, then bitch about it. No - * need to rate-limit; it's CAP_SYS_ADMIN only. */ + * need to rate-limit; it's CAP_SYS_ADMIN only. + */ if (port->flags & UPF_SPD_MASK) { - printk(KERN_NOTICE "%s sets custom speed on %s%d. This is deprecated.\n", - current->comm, state->info->tty->driver->name, - state->port->line); + char buf[64]; + printk(KERN_NOTICE + "%s sets custom speed on %s. This " + "is deprecated.\n", current->comm, + tty_name(state->info->tty, buf)); } uart_change_speed(state, NULL); } -- 2.53.0