diff options
Diffstat (limited to 'drivers/usb/serial/digi_acceleport.c')
-rw-r--r-- | drivers/usb/serial/digi_acceleport.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c index 3b6348414c4..38172285842 100644 --- a/drivers/usb/serial/digi_acceleport.c +++ b/drivers/usb/serial/digi_acceleport.c | |||
@@ -1658,7 +1658,6 @@ static int digi_read_inb_callback(struct urb *urb) | |||
1658 | int port_status = ((unsigned char *)urb->transfer_buffer)[2]; | 1658 | int port_status = ((unsigned char *)urb->transfer_buffer)[2]; |
1659 | unsigned char *data = ((unsigned char *)urb->transfer_buffer) + 3; | 1659 | unsigned char *data = ((unsigned char *)urb->transfer_buffer) + 3; |
1660 | int flag, throttled; | 1660 | int flag, throttled; |
1661 | int i; | ||
1662 | int status = urb->status; | 1661 | int status = urb->status; |
1663 | 1662 | ||
1664 | /* do not process callbacks on closed ports */ | 1663 | /* do not process callbacks on closed ports */ |
@@ -1705,17 +1704,9 @@ static int digi_read_inb_callback(struct urb *urb) | |||
1705 | 1704 | ||
1706 | /* data length is len-1 (one byte of len is port_status) */ | 1705 | /* data length is len-1 (one byte of len is port_status) */ |
1707 | --len; | 1706 | --len; |
1708 | |||
1709 | len = tty_buffer_request_room(tty, len); | ||
1710 | if (len > 0) { | 1707 | if (len > 0) { |
1711 | /* Hot path */ | 1708 | tty_insert_flip_string_fixed_flag(tty, data, len, |
1712 | if (flag == TTY_NORMAL) | 1709 | flag); |
1713 | tty_insert_flip_string(tty, data, len); | ||
1714 | else { | ||
1715 | for (i = 0; i < len; i++) | ||
1716 | tty_insert_flip_char(tty, | ||
1717 | data[i], flag); | ||
1718 | } | ||
1719 | tty_flip_buffer_push(tty); | 1710 | tty_flip_buffer_push(tty); |
1720 | } | 1711 | } |
1721 | } | 1712 | } |