]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/usb/serial/ir-usb.c
USB: tty: Prune uses of tty_request_room in the USB layer
[net-next-2.6.git] / drivers / usb / serial / ir-usb.c
index 95d8d26b9a44de53501d02ddd02f4d7e8c07fa1d..c3e5d506aead3368776115319983a8ada014735b 100644 (file)
@@ -100,7 +100,7 @@ static u8 ir_baud;
 static u8 ir_xbof;
 static u8 ir_add_bof;
 
-static struct usb_device_id ir_id_table[] = {
+static const struct usb_device_id ir_id_table[] = {
        { USB_DEVICE(0x050f, 0x0180) },         /* KC Technology, KC-180 */
        { USB_DEVICE(0x08e9, 0x0100) },         /* XTNDAccess */
        { USB_DEVICE(0x09c4, 0x0011) },         /* ACTiSys ACT-IR2000U */
@@ -462,10 +462,8 @@ static void ir_read_bulk_callback(struct urb *urb)
                usb_serial_debug_data(debug, &port->dev, __func__,
                                                urb->actual_length, data);
                tty = tty_port_tty_get(&port->port);
-               if (tty_buffer_request_room(tty, urb->actual_length - 1)) {
-                       tty_insert_flip_string(tty, data+1, urb->actual_length - 1);
-                       tty_flip_buffer_push(tty);
-               }
+               tty_insert_flip_string(tty, data+1, urb->actual_length - 1);
+               tty_flip_buffer_push(tty);
                tty_kref_put(tty);
 
                /*