console.c (664b0bae0b87f69bc9deb098f5e0158b9cf18e04) | console.c (f51ccf46217c28758b1f3b5bc0ccfc00eca658b2) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * USB Serial Console driver 4 * 5 * Copyright (C) 2001 - 2002 Greg Kroah-Hartman (greg@kroah.com) 6 * 7 * Thanks to Randy Dunlap for the original version of this code. 8 * --- 87 unchanged lines hidden (view full) --- 96 switch (parity) { 97 case 'o': case 'O': 98 cflag |= PARODD; 99 break; 100 case 'e': case 'E': 101 cflag |= PARENB; 102 break; 103 } | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * USB Serial Console driver 4 * 5 * Copyright (C) 2001 - 2002 Greg Kroah-Hartman (greg@kroah.com) 6 * 7 * Thanks to Randy Dunlap for the original version of this code. 8 * --- 87 unchanged lines hidden (view full) --- 96 switch (parity) { 97 case 'o': case 'O': 98 cflag |= PARODD; 99 break; 100 case 'e': case 'E': 101 cflag |= PARENB; 102 break; 103 } |
104 co->cflag = cflag; | |
105 106 /* 107 * no need to check the index here: if the index is wrong, console 108 * code won't call us 109 */ 110 port = usb_serial_port_get_by_minor(co->index); 111 if (port == NULL) { 112 /* no device is connected yet, sorry :( */ --- 46 unchanged lines hidden (view full) --- 159 160 if (serial->type->set_termios) { 161 tty->termios.c_cflag = cflag; 162 tty_termios_encode_baud_rate(&tty->termios, baud, baud); 163 memset(&dummy, 0, sizeof(struct ktermios)); 164 serial->type->set_termios(tty, port, &dummy); 165 166 tty_port_tty_set(&port->port, NULL); | 104 105 /* 106 * no need to check the index here: if the index is wrong, console 107 * code won't call us 108 */ 109 port = usb_serial_port_get_by_minor(co->index); 110 if (port == NULL) { 111 /* no device is connected yet, sorry :( */ --- 46 unchanged lines hidden (view full) --- 158 159 if (serial->type->set_termios) { 160 tty->termios.c_cflag = cflag; 161 tty_termios_encode_baud_rate(&tty->termios, baud, baud); 162 memset(&dummy, 0, sizeof(struct ktermios)); 163 serial->type->set_termios(tty, port, &dummy); 164 165 tty_port_tty_set(&port->port, NULL); |
166 tty_save_termios(tty); |
|
167 tty_kref_put(tty); 168 } 169 tty_port_set_initialized(&port->port, 1); 170 } 171 /* Now that any required fake tty operations are completed restore 172 * the tty port count */ 173 --port->port.count; 174 /* The console is special in terms of closing the device so --- 127 unchanged lines hidden --- | 167 tty_kref_put(tty); 168 } 169 tty_port_set_initialized(&port->port, 1); 170 } 171 /* Now that any required fake tty operations are completed restore 172 * the tty port count */ 173 --port->port.count; 174 /* The console is special in terms of closing the device so --- 127 unchanged lines hidden --- |