aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/console.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/console.c')
-rw-r--r--drivers/usb/serial/console.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/serial/console.c b/drivers/usb/serial/console.c
index 5f3bcd31e204..afb50eab2049 100644
--- a/drivers/usb/serial/console.c
+++ b/drivers/usb/serial/console.c
@@ -108,18 +108,18 @@ static int usb_console_setup(struct console *co, char *options)
108 * no need to check the index here: if the index is wrong, console 108 * no need to check the index here: if the index is wrong, console
109 * code won't call us 109 * code won't call us
110 */ 110 */
111 serial = usb_serial_get_by_index(co->index); 111 port = usb_serial_port_get_by_minor(co->index);
112 if (serial == NULL) { 112 if (port == NULL) {
113 /* no device is connected yet, sorry :( */ 113 /* no device is connected yet, sorry :( */
114 pr_err("No USB device connected to ttyUSB%i\n", co->index); 114 pr_err("No USB device connected to ttyUSB%i\n", co->index);
115 return -ENODEV; 115 return -ENODEV;
116 } 116 }
117 serial = port->serial;
117 118
118 retval = usb_autopm_get_interface(serial->interface); 119 retval = usb_autopm_get_interface(serial->interface);
119 if (retval) 120 if (retval)
120 goto error_get_interface; 121 goto error_get_interface;
121 122
122 port = serial->port[co->index - serial->minor];
123 tty_port_tty_set(&port->port, NULL); 123 tty_port_tty_set(&port->port, NULL);
124 124
125 info->port = port; 125 info->port = port;
@@ -210,7 +210,7 @@ static void usb_console_write(struct console *co,
210 if (count == 0) 210 if (count == 0)
211 return; 211 return;
212 212
213 pr_debug("%s - port %d, %d byte(s)\n", __func__, port->number, count); 213 pr_debug("%s - minor %d, %d byte(s)\n", __func__, port->minor, count);
214 214
215 if (!port->port.console) { 215 if (!port->port.console) {
216 pr_debug("%s - port not opened\n", __func__); 216 pr_debug("%s - port not opened\n", __func__);