console.c (95d002e0a34cb0f238abb39987f9980f325d8332) | console.c (cabe0785ff14e944ab1d828bed64e796e8f96594) |
---|---|
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 * --- 65 unchanged lines hidden (view full) --- 74 s++; 75 if (*s) 76 parity = *s++; 77 if (*s) 78 bits = *s++ - '0'; 79 if (*s) 80 doflow = (*s++ == 'r'); 81 } | 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 * --- 65 unchanged lines hidden (view full) --- 74 s++; 75 if (*s) 76 parity = *s++; 77 if (*s) 78 bits = *s++ - '0'; 79 if (*s) 80 doflow = (*s++ == 'r'); 81 } |
82 | 82 |
83 /* Sane default */ 84 if (baud == 0) 85 baud = 9600; 86 87 switch (bits) { 88 case 7: 89 cflag |= CS7; 90 break; --- 6 unchanged lines hidden (view full) --- 97 case 'o': case 'O': 98 cflag |= PARODD; 99 break; 100 case 'e': case 'E': 101 cflag |= PARENB; 102 break; 103 } 104 | 83 /* Sane default */ 84 if (baud == 0) 85 baud = 9600; 86 87 switch (bits) { 88 case 7: 89 cflag |= CS7; 90 break; --- 6 unchanged lines hidden (view full) --- 97 case 'o': case 'O': 98 cflag |= PARODD; 99 break; 100 case 'e': case 'E': 101 cflag |= PARENB; 102 break; 103 } 104 |
105 if (doflow) 106 cflag |= CRTSCTS; 107 |
|
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 :( */ 112 pr_err("No USB device connected to ttyUSB%i\n", co->index); --- 189 unchanged lines hidden --- | 108 /* 109 * no need to check the index here: if the index is wrong, console 110 * code won't call us 111 */ 112 port = usb_serial_port_get_by_minor(co->index); 113 if (port == NULL) { 114 /* no device is connected yet, sorry :( */ 115 pr_err("No USB device connected to ttyUSB%i\n", co->index); --- 189 unchanged lines hidden --- |