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.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/usb/serial/console.c b/drivers/usb/serial/console.c
index 7b74238ad1c7..5b20de130e08 100644
--- a/drivers/usb/serial/console.c
+++ b/drivers/usb/serial/console.c
@@ -117,7 +117,7 @@ static int usb_console_setup(struct console *co, char *options)
117 } 117 }
118 118
119 port = serial->port[0]; 119 port = serial->port[0];
120 port->port.tty = NULL; 120 tty_port_tty_set(&port->port, NULL);
121 121
122 info->port = port; 122 info->port = port;
123 123
@@ -143,7 +143,7 @@ static int usb_console_setup(struct console *co, char *options)
143 } 143 }
144 memset(&dummy, 0, sizeof(struct ktermios)); 144 memset(&dummy, 0, sizeof(struct ktermios));
145 tty->termios = termios; 145 tty->termios = termios;
146 port->port.tty = tty; 146 tty_port_tty_set(&port->port, tty);
147 } 147 }
148 148
149 /* only call the device specific open if this 149 /* only call the device specific open if this
@@ -161,9 +161,9 @@ static int usb_console_setup(struct console *co, char *options)
161 if (serial->type->set_termios) { 161 if (serial->type->set_termios) {
162 termios->c_cflag = cflag; 162 termios->c_cflag = cflag;
163 tty_termios_encode_baud_rate(termios, baud, baud); 163 tty_termios_encode_baud_rate(termios, baud, baud);
164 serial->type->set_termios(NULL, port, &dummy); 164 serial->type->set_termios(tty, port, &dummy);
165 165
166 port->port.tty = NULL; 166 tty_port_tty_set(&port->port, NULL);
167 kfree(termios); 167 kfree(termios);
168 kfree(tty); 168 kfree(tty);
169 } 169 }
@@ -176,7 +176,7 @@ out:
176 return retval; 176 return retval;
177free_termios: 177free_termios:
178 kfree(termios); 178 kfree(termios);
179 port->port.tty = NULL; 179 tty_port_tty_set(&port->port, NULL);
180free_tty: 180free_tty:
181 kfree(tty); 181 kfree(tty);
182reset_open_count: 182reset_open_count: