aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/whiteheat.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/whiteheat.c')
-rw-r--r--drivers/usb/serial/whiteheat.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c
index 1093d2eb046a..12ed8209ca72 100644
--- a/drivers/usb/serial/whiteheat.c
+++ b/drivers/usb/serial/whiteheat.c
@@ -111,17 +111,17 @@ static int debug;
111 separate ID tables, and then a third table that combines them 111 separate ID tables, and then a third table that combines them
112 just for the purpose of exporting the autoloading information. 112 just for the purpose of exporting the autoloading information.
113*/ 113*/
114static struct usb_device_id id_table_std [] = { 114static const struct usb_device_id id_table_std[] = {
115 { USB_DEVICE(CONNECT_TECH_VENDOR_ID, CONNECT_TECH_WHITE_HEAT_ID) }, 115 { USB_DEVICE(CONNECT_TECH_VENDOR_ID, CONNECT_TECH_WHITE_HEAT_ID) },
116 { } /* Terminating entry */ 116 { } /* Terminating entry */
117}; 117};
118 118
119static struct usb_device_id id_table_prerenumeration [] = { 119static const struct usb_device_id id_table_prerenumeration[] = {
120 { USB_DEVICE(CONNECT_TECH_VENDOR_ID, CONNECT_TECH_FAKE_WHITE_HEAT_ID) }, 120 { USB_DEVICE(CONNECT_TECH_VENDOR_ID, CONNECT_TECH_FAKE_WHITE_HEAT_ID) },
121 { } /* Terminating entry */ 121 { } /* Terminating entry */
122}; 122};
123 123
124static struct usb_device_id id_table_combined [] = { 124static const struct usb_device_id id_table_combined[] = {
125 { USB_DEVICE(CONNECT_TECH_VENDOR_ID, CONNECT_TECH_WHITE_HEAT_ID) }, 125 { USB_DEVICE(CONNECT_TECH_VENDOR_ID, CONNECT_TECH_WHITE_HEAT_ID) },
126 { USB_DEVICE(CONNECT_TECH_VENDOR_ID, CONNECT_TECH_FAKE_WHITE_HEAT_ID) }, 126 { USB_DEVICE(CONNECT_TECH_VENDOR_ID, CONNECT_TECH_FAKE_WHITE_HEAT_ID) },
127 { } /* Terminating entry */ 127 { } /* Terminating entry */
@@ -1492,21 +1492,9 @@ static void rx_data_softint(struct work_struct *work)
1492 wrap = list_entry(tmp, struct whiteheat_urb_wrap, list); 1492 wrap = list_entry(tmp, struct whiteheat_urb_wrap, list);
1493 urb = wrap->urb; 1493 urb = wrap->urb;
1494 1494
1495 if (tty && urb->actual_length) { 1495 if (tty && urb->actual_length)
1496 int len = tty_buffer_request_room(tty, 1496 sent += tty_insert_flip_string(tty,
1497 urb->actual_length); 1497 urb->transfer_buffer, urb->actual_length);
1498 /* This stuff can go away now I suspect */
1499 if (unlikely(len < urb->actual_length)) {
1500 spin_lock_irqsave(&info->lock, flags);
1501 list_add(tmp, &info->rx_urb_q);
1502 spin_unlock_irqrestore(&info->lock, flags);
1503 tty_flip_buffer_push(tty);
1504 schedule_work(&info->rx_work);
1505 goto out;
1506 }
1507 tty_insert_flip_string(tty, urb->transfer_buffer, len);
1508 sent += len;
1509 }
1510 1498
1511 urb->dev = port->serial->dev; 1499 urb->dev = port->serial->dev;
1512 result = usb_submit_urb(urb, GFP_ATOMIC); 1500 result = usb_submit_urb(urb, GFP_ATOMIC);