Hi,

I found minor bugs in mct_u232.c; patch is attached. As I don't have
such a device, someone should have a look at it.

Regards, Hansjoerg

diff -urp linux-2.6.11.orig/drivers/usb/serial/mct_u232.c 
linux-2.6.11/drivers/usb/serial/mct_u232.c
--- linux-2.6.11.orig/drivers/usb/serial/mct_u232.c     2005-02-09 
21:27:57.000000000 +0100
+++ linux-2.6.11/drivers/usb/serial/mct_u232.c  2005-03-03 15:52:49.000000000 
+0100
@@ -195,16 +195,16 @@ static int mct_u232_calculate_baud_rate(
                }
        } else {
                switch (value) {
-               case    B300: value =     300;
-               case    B600: value =     600;
-               case   B1200: value =    1200;
-               case   B2400: value =    2400;
-               case   B4800: value =    4800;
-               case   B9600: value =    9600;
-               case  B19200: value =   19200;
-               case  B38400: value =   38400;
-               case  B57600: value =   57600;
-               case B115200: value =  115200;
+               case    B300: value =     300; break;
+               case    B600: value =     600; break;
+               case   B1200: value =    1200; break;
+               case   B2400: value =    2400; break;
+               case   B4800: value =    4800; break;
+               case   B9600: value =    9600; break;
+               case  B19200: value =   19200; break;
+               case  B38400: value =   38400; break;
+               case  B57600: value =   57600; break;
+               case B115200: value =  115200; break;
                default:
                        err("MCT USB-RS232: unsupported baudrate request 0x%x,"
                            " using default of B9600", value);
@@ -646,7 +646,7 @@ static void mct_u232_set_termios (struct
        else
                new_state &= ~(TIOCM_DTR | TIOCM_RTS);
        if (new_state != control_state) {
-               mct_u232_set_modem_ctrl(serial, control_state);
+               mct_u232_set_modem_ctrl(serial, new_state);
                control_state = new_state;
        }
 


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to