mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-04-19 04:44:03 +00:00
USB: console.c: remove err() usage
err() was a very old USB-specific macro that I thought had gone away. This patch removes it from being used in the driver and uses dev_err() instead. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
45714104b9
commit
085fb96262
1 changed files with 5 additions and 4 deletions
|
@ -113,7 +113,8 @@ static int usb_console_setup(struct console *co, char *options)
|
||||||
serial = usb_serial_get_by_index(co->index);
|
serial = usb_serial_get_by_index(co->index);
|
||||||
if (serial == NULL) {
|
if (serial == NULL) {
|
||||||
/* no device is connected yet, sorry :( */
|
/* no device is connected yet, sorry :( */
|
||||||
err("No USB device connected to ttyUSB%i", co->index);
|
printk(KERN_ERR "No USB device connected to ttyUSB%i\n",
|
||||||
|
co->index);
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -137,7 +138,7 @@ static int usb_console_setup(struct console *co, char *options)
|
||||||
tty = kzalloc(sizeof(*tty), GFP_KERNEL);
|
tty = kzalloc(sizeof(*tty), GFP_KERNEL);
|
||||||
if (!tty) {
|
if (!tty) {
|
||||||
retval = -ENOMEM;
|
retval = -ENOMEM;
|
||||||
err("no more memory");
|
dev_err(&port->dev, "no more memory\n");
|
||||||
goto reset_open_count;
|
goto reset_open_count;
|
||||||
}
|
}
|
||||||
kref_init(&tty->kref);
|
kref_init(&tty->kref);
|
||||||
|
@ -146,7 +147,7 @@ static int usb_console_setup(struct console *co, char *options)
|
||||||
tty->index = co->index;
|
tty->index = co->index;
|
||||||
if (tty_init_termios(tty)) {
|
if (tty_init_termios(tty)) {
|
||||||
retval = -ENOMEM;
|
retval = -ENOMEM;
|
||||||
err("no more memory");
|
dev_err(&port->dev, "no more memory\n");
|
||||||
goto free_tty;
|
goto free_tty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -159,7 +160,7 @@ static int usb_console_setup(struct console *co, char *options)
|
||||||
retval = usb_serial_generic_open(NULL, port);
|
retval = usb_serial_generic_open(NULL, port);
|
||||||
|
|
||||||
if (retval) {
|
if (retval) {
|
||||||
err("could not open USB console port");
|
dev_err(&port->dev, "could not open USB console port\n");
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue