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 e980766bb84b..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
@@ -163,7 +163,7 @@ static int usb_console_setup(struct console *co, char *options)
163 tty_termios_encode_baud_rate(termios, baud, baud); 163 tty_termios_encode_baud_rate(termios, baud, baud);
164 serial->type->set_termios(tty, 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: