From a5b6f60c5a30c494017c7a2d11c4067f90d3d0df Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Tue, 8 Apr 2008 17:16:06 +0100 Subject: usb serial: more fixes and groundwork for tty changes - If a termios change fails due to lack of memory we should copy the old settings back over as the device has not changed - Note various locking problems - kl5kusb105 had various remaining tty flag handling problems - Make safe_serial use tty_insert_flip_string not open coded loops - set termios speed properly in usb_serial Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/keyspan.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'drivers/usb/serial/keyspan.c') diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c index 857c5312555a..0d122feb2b22 100644 --- a/drivers/usb/serial/keyspan.c +++ b/drivers/usb/serial/keyspan.c @@ -1187,6 +1187,7 @@ static int keyspan_write_room (struct usb_serial_port *port) p_priv = usb_get_serial_port_data(port); d_details = p_priv->device_details; + /* FIXME: locking */ if (d_details->msg_format == msg_usa90) data_len = 64; else @@ -1203,13 +1204,13 @@ static int keyspan_write_room (struct usb_serial_port *port) if (this_urb->status != -EINPROGRESS) return (data_len); } - return (0); + return 0; } static int keyspan_chars_in_buffer (struct usb_serial_port *port) { - return (0); + return 0; } @@ -1289,7 +1290,7 @@ static int keyspan_open (struct usb_serial_port *port, struct file *filp) //mdelay(100); //keyspan_set_termios(port, NULL); - return (0); + return 0; } static inline void stop_urb(struct urb *urb) @@ -2006,7 +2007,7 @@ static int keyspan_usa26_send_setup(struct usb_serial *serial, } #endif - return (0); + return 0; } static int keyspan_usa28_send_setup(struct usb_serial *serial, @@ -2131,7 +2132,7 @@ static int keyspan_usa28_send_setup(struct usb_serial *serial, } #endif - return (0); + return 0; } static int keyspan_usa49_send_setup(struct usb_serial *serial, @@ -2317,7 +2318,7 @@ static int keyspan_usa49_send_setup(struct usb_serial *serial, } #endif - return (0); + return 0; } static int keyspan_usa90_send_setup(struct usb_serial *serial, @@ -2455,7 +2456,7 @@ static int keyspan_usa90_send_setup(struct usb_serial *serial, if ((err = usb_submit_urb(this_urb, GFP_ATOMIC)) != 0) { dbg("%s - usb_submit_urb(setup) failed (%d)", __func__, err); } - return (0); + return 0; } static int keyspan_usa67_send_setup(struct usb_serial *serial, @@ -2603,7 +2604,7 @@ static int keyspan_usa67_send_setup(struct usb_serial *serial, if (err != 0) dbg("%s - usb_submit_urb(setup) failed (%d)", __func__, err); - return (0); + return 0; } static void keyspan_send_setup(struct usb_serial_port *port, int reset_port) @@ -2696,7 +2697,7 @@ static int keyspan_startup (struct usb_serial *serial) err); } - return (0); + return 0; } static void keyspan_shutdown (struct usb_serial *serial) -- cgit v1.2.1