diff options
Diffstat (limited to 'drivers/usb/serial/f81232.c')
-rw-r--r-- | drivers/usb/serial/f81232.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index 6e4eb57d0177..b1b2dc64b50b 100644 --- a/drivers/usb/serial/f81232.c +++ b/drivers/usb/serial/f81232.c | |||
@@ -100,7 +100,6 @@ static void f81232_process_read_urb(struct urb *urb) | |||
100 | { | 100 | { |
101 | struct usb_serial_port *port = urb->context; | 101 | struct usb_serial_port *port = urb->context; |
102 | struct f81232_private *priv = usb_get_serial_port_data(port); | 102 | struct f81232_private *priv = usb_get_serial_port_data(port); |
103 | struct tty_struct *tty; | ||
104 | unsigned char *data = urb->transfer_buffer; | 103 | unsigned char *data = urb->transfer_buffer; |
105 | char tty_flag = TTY_NORMAL; | 104 | char tty_flag = TTY_NORMAL; |
106 | unsigned long flags; | 105 | unsigned long flags; |
@@ -117,10 +116,6 @@ static void f81232_process_read_urb(struct urb *urb) | |||
117 | if (!urb->actual_length) | 116 | if (!urb->actual_length) |
118 | return; | 117 | return; |
119 | 118 | ||
120 | tty = tty_port_tty_get(&port->port); | ||
121 | if (!tty) | ||
122 | return; | ||
123 | |||
124 | /* break takes precedence over parity, */ | 119 | /* break takes precedence over parity, */ |
125 | /* which takes precedence over framing errors */ | 120 | /* which takes precedence over framing errors */ |
126 | if (line_status & UART_BREAK_ERROR) | 121 | if (line_status & UART_BREAK_ERROR) |
@@ -133,19 +128,19 @@ static void f81232_process_read_urb(struct urb *urb) | |||
133 | 128 | ||
134 | /* overrun is special, not associated with a char */ | 129 | /* overrun is special, not associated with a char */ |
135 | if (line_status & UART_OVERRUN_ERROR) | 130 | if (line_status & UART_OVERRUN_ERROR) |
136 | tty_insert_flip_char(tty, 0, TTY_OVERRUN); | 131 | tty_insert_flip_char(&port->port, 0, TTY_OVERRUN); |
137 | 132 | ||
138 | if (port->port.console && port->sysrq) { | 133 | if (port->port.console && port->sysrq) { |
139 | for (i = 0; i < urb->actual_length; ++i) | 134 | for (i = 0; i < urb->actual_length; ++i) |
140 | if (!usb_serial_handle_sysrq_char(port, data[i])) | 135 | if (!usb_serial_handle_sysrq_char(port, data[i])) |
141 | tty_insert_flip_char(tty, data[i], tty_flag); | 136 | tty_insert_flip_char(&port->port, data[i], |
137 | tty_flag); | ||
142 | } else { | 138 | } else { |
143 | tty_insert_flip_string_fixed_flag(tty, data, tty_flag, | 139 | tty_insert_flip_string_fixed_flag(&port->port, data, tty_flag, |
144 | urb->actual_length); | 140 | urb->actual_length); |
145 | } | 141 | } |
146 | 142 | ||
147 | tty_flip_buffer_push(tty); | 143 | tty_flip_buffer_push(&port->port); |
148 | tty_kref_put(tty); | ||
149 | } | 144 | } |
150 | 145 | ||
151 | static int set_control_lines(struct usb_device *dev, u8 value) | 146 | static int set_control_lines(struct usb_device *dev, u8 value) |