quatech2.c (2c4cdf5950b1a7a9d731c03c56e2cea3bd8ca7b7) quatech2.c (27b351c5546008c640b3e65152f60ca74b3706f1)
1/*
2 * usb-serial driver for Quatech USB 2 devices
3 *
4 * Copyright (C) 2012 Bill Pemberton (wfp5p@virginia.edu)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License version 2
8 * as published by the Free Software Foundation.

--- 647 unchanged lines hidden (view full) ---

656 break;
657 case QT2_CHANGE_PORT:
658 if (i > (len - 4)) {
659 dev_warn(&port->dev,
660 "%s - change_port message too short\n",
661 __func__);
662 break;
663 }
1/*
2 * usb-serial driver for Quatech USB 2 devices
3 *
4 * Copyright (C) 2012 Bill Pemberton (wfp5p@virginia.edu)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License version 2
8 * as published by the Free Software Foundation.

--- 647 unchanged lines hidden (view full) ---

656 break;
657 case QT2_CHANGE_PORT:
658 if (i > (len - 4)) {
659 dev_warn(&port->dev,
660 "%s - change_port message too short\n",
661 __func__);
662 break;
663 }
664 tty_flip_buffer_push(&port->port);
665
664
665 if (port_priv->is_open)
666 tty_flip_buffer_push(&port->port);
667
666 newport = *(ch + 3);
667
668 if (newport > serial->num_ports) {
669 dev_err(&port->dev,
670 "%s - port change to invalid port: %i\n",
671 __func__, newport);
672 break;
673 }

--- 25 unchanged lines hidden (view full) ---

699 if (escapeflag)
700 continue;
701 }
702
703 tty_buffer_request_room(&port->port, 1);
704 tty_insert_flip_string(&port->port, ch, 1);
705 }
706
668 newport = *(ch + 3);
669
670 if (newport > serial->num_ports) {
671 dev_err(&port->dev,
672 "%s - port change to invalid port: %i\n",
673 __func__, newport);
674 break;
675 }

--- 25 unchanged lines hidden (view full) ---

701 if (escapeflag)
702 continue;
703 }
704
705 tty_buffer_request_room(&port->port, 1);
706 tty_insert_flip_string(&port->port, ch, 1);
707 }
708
707 tty_flip_buffer_push(&port->port);
709 if (port_priv->is_open)
710 tty_flip_buffer_push(&port->port);
708}
709
710static void qt2_write_bulk_callback(struct urb *urb)
711{
712 struct usb_serial_port *port;
713 struct qt2_port_private *port_priv;
714
715 port = urb->context;

--- 397 unchanged lines hidden ---
711}
712
713static void qt2_write_bulk_callback(struct urb *urb)
714{
715 struct usb_serial_port *port;
716 struct qt2_port_private *port_priv;
717
718 port = urb->context;

--- 397 unchanged lines hidden ---