diff options
Diffstat (limited to 'drivers/usb/serial/symbolserial.c')
-rw-r--r-- | drivers/usb/serial/symbolserial.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/usb/serial/symbolserial.c b/drivers/usb/serial/symbolserial.c index b282c0f2d8e5..72398888858f 100644 --- a/drivers/usb/serial/symbolserial.c +++ b/drivers/usb/serial/symbolserial.c | |||
@@ -21,7 +21,7 @@ | |||
21 | 21 | ||
22 | static int debug; | 22 | static int debug; |
23 | 23 | ||
24 | static struct usb_device_id id_table[] = { | 24 | static const struct usb_device_id id_table[] = { |
25 | { USB_DEVICE(0x05e0, 0x0600) }, | 25 | { USB_DEVICE(0x05e0, 0x0600) }, |
26 | { }, | 26 | { }, |
27 | }; | 27 | }; |
@@ -51,7 +51,6 @@ static void symbol_int_callback(struct urb *urb) | |||
51 | int status = urb->status; | 51 | int status = urb->status; |
52 | struct tty_struct *tty; | 52 | struct tty_struct *tty; |
53 | int result; | 53 | int result; |
54 | int available_room = 0; | ||
55 | int data_length; | 54 | int data_length; |
56 | 55 | ||
57 | dbg("%s - port %d", __func__, port->number); | 56 | dbg("%s - port %d", __func__, port->number); |
@@ -89,13 +88,8 @@ static void symbol_int_callback(struct urb *urb) | |||
89 | */ | 88 | */ |
90 | tty = tty_port_tty_get(&port->port); | 89 | tty = tty_port_tty_get(&port->port); |
91 | if (tty) { | 90 | if (tty) { |
92 | available_room = tty_buffer_request_room(tty, | 91 | tty_insert_flip_string(tty, &data[1], data_length); |
93 | data_length); | 92 | tty_flip_buffer_push(tty); |
94 | if (available_room) { | ||
95 | tty_insert_flip_string(tty, &data[1], | ||
96 | available_room); | ||
97 | tty_flip_buffer_push(tty); | ||
98 | } | ||
99 | tty_kref_put(tty); | 93 | tty_kref_put(tty); |
100 | } | 94 | } |
101 | } else { | 95 | } else { |