aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2007-09-26 18:34:18 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-10-12 17:55:32 -0400
commitd9c563626d9a136636385209d59d0c4f16c4a7ab (patch)
tree160565a3f1bdb7c9720757a2e1858bf4bf598b60 /drivers/usb
parent3046c6db575019ba4ce6b9deac352d438ddf733d (diff)
USB: visor: termios bits
Visor has a huge complex routine which displays termios bits for debug but doesn't do anything. Get the correct behaviour by removing it all Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/serial/visor.c64
1 files changed, 0 insertions, 64 deletions
diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c
index 30e08c0bcdc2..7ee087fed913 100644
--- a/drivers/usb/serial/visor.c
+++ b/drivers/usb/serial/visor.c
@@ -46,7 +46,6 @@ static int visor_probe (struct usb_serial *serial, const struct usb_device_id
46static int visor_calc_num_ports(struct usb_serial *serial); 46static int visor_calc_num_ports(struct usb_serial *serial);
47static void visor_shutdown (struct usb_serial *serial); 47static void visor_shutdown (struct usb_serial *serial);
48static int visor_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg); 48static int visor_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg);
49static void visor_set_termios (struct usb_serial_port *port, struct ktermios *old_termios);
50static void visor_write_bulk_callback (struct urb *urb); 49static void visor_write_bulk_callback (struct urb *urb);
51static void visor_read_bulk_callback (struct urb *urb); 50static void visor_read_bulk_callback (struct urb *urb);
52static void visor_read_int_callback (struct urb *urb); 51static void visor_read_int_callback (struct urb *urb);
@@ -203,7 +202,6 @@ static struct usb_serial_driver handspring_device = {
203 .calc_num_ports = visor_calc_num_ports, 202 .calc_num_ports = visor_calc_num_ports,
204 .shutdown = visor_shutdown, 203 .shutdown = visor_shutdown,
205 .ioctl = visor_ioctl, 204 .ioctl = visor_ioctl,
206 .set_termios = visor_set_termios,
207 .write = visor_write, 205 .write = visor_write,
208 .write_room = visor_write_room, 206 .write_room = visor_write_room,
209 .chars_in_buffer = visor_chars_in_buffer, 207 .chars_in_buffer = visor_chars_in_buffer,
@@ -234,7 +232,6 @@ static struct usb_serial_driver clie_5_device = {
234 .calc_num_ports = visor_calc_num_ports, 232 .calc_num_ports = visor_calc_num_ports,
235 .shutdown = visor_shutdown, 233 .shutdown = visor_shutdown,
236 .ioctl = visor_ioctl, 234 .ioctl = visor_ioctl,
237 .set_termios = visor_set_termios,
238 .write = visor_write, 235 .write = visor_write,
239 .write_room = visor_write_room, 236 .write_room = visor_write_room,
240 .chars_in_buffer = visor_chars_in_buffer, 237 .chars_in_buffer = visor_chars_in_buffer,
@@ -262,7 +259,6 @@ static struct usb_serial_driver clie_3_5_device = {
262 .unthrottle = visor_unthrottle, 259 .unthrottle = visor_unthrottle,
263 .attach = clie_3_5_startup, 260 .attach = clie_3_5_startup,
264 .ioctl = visor_ioctl, 261 .ioctl = visor_ioctl,
265 .set_termios = visor_set_termios,
266 .write = visor_write, 262 .write = visor_write,
267 .write_room = visor_write_room, 263 .write_room = visor_write_room,
268 .chars_in_buffer = visor_chars_in_buffer, 264 .chars_in_buffer = visor_chars_in_buffer,
@@ -936,66 +932,6 @@ static int visor_ioctl (struct usb_serial_port *port, struct file * file, unsign
936 return -ENOIOCTLCMD; 932 return -ENOIOCTLCMD;
937} 933}
938 934
939
940/* This function is all nice and good, but we don't change anything based on it :) */
941static void visor_set_termios (struct usb_serial_port *port, struct ktermios *old_termios)
942{
943 unsigned int cflag;
944
945 dbg("%s - port %d", __FUNCTION__, port->number);
946
947 if ((!port->tty) || (!port->tty->termios)) {
948 dbg("%s - no tty structures", __FUNCTION__);
949 return;
950 }
951
952 cflag = port->tty->termios->c_cflag;
953
954 /* get the byte size */
955 switch (cflag & CSIZE) {
956 case CS5: dbg("%s - data bits = 5", __FUNCTION__); break;
957 case CS6: dbg("%s - data bits = 6", __FUNCTION__); break;
958 case CS7: dbg("%s - data bits = 7", __FUNCTION__); break;
959 default:
960 case CS8: dbg("%s - data bits = 8", __FUNCTION__); break;
961 }
962
963 /* determine the parity */
964 if (cflag & PARENB)
965 if (cflag & PARODD)
966 dbg("%s - parity = odd", __FUNCTION__);
967 else
968 dbg("%s - parity = even", __FUNCTION__);
969 else
970 dbg("%s - parity = none", __FUNCTION__);
971
972 /* figure out the stop bits requested */
973 if (cflag & CSTOPB)
974 dbg("%s - stop bits = 2", __FUNCTION__);
975 else
976 dbg("%s - stop bits = 1", __FUNCTION__);
977
978
979 /* figure out the flow control settings */
980 if (cflag & CRTSCTS)
981 dbg("%s - RTS/CTS is enabled", __FUNCTION__);
982 else
983 dbg("%s - RTS/CTS is disabled", __FUNCTION__);
984
985 /* determine software flow control */
986 if (I_IXOFF(port->tty))
987 dbg("%s - XON/XOFF is enabled, XON = %2x, XOFF = %2x",
988 __FUNCTION__, START_CHAR(port->tty), STOP_CHAR(port->tty));
989 else
990 dbg("%s - XON/XOFF is disabled", __FUNCTION__);
991
992 /* get the baud rate wanted */
993 dbg("%s - baud rate = %d", __FUNCTION__, tty_get_baud_rate(port->tty));
994
995 return;
996}
997
998
999static int __init visor_init (void) 935static int __init visor_init (void)
1000{ 936{
1001 int i, retval; 937 int i, retval;