patch-2.4.10 linux/drivers/usb/serial/whiteheat.c
Next file: linux/drivers/usb/serial/xircom_pgs.S
Previous file: linux/drivers/usb/serial/visor.h
Back to the patch index
Back to the overall index
- Lines: 41
- Date:
Fri Sep 14 14:04:07 2001
- Orig file:
v2.4.9/linux/drivers/usb/serial/whiteheat.c
- Orig date:
Tue Jul 3 17:08:21 2001
diff -u --recursive --new-file v2.4.9/linux/drivers/usb/serial/whiteheat.c linux/drivers/usb/serial/whiteheat.c
@@ -412,12 +412,19 @@
static void whiteheat_set_termios (struct usb_serial_port *port, struct termios *old_termios)
{
- unsigned int cflag = port->tty->termios->c_cflag;
+ unsigned int cflag;
struct whiteheat_port_settings port_settings;
dbg(__FUNCTION__ " -port %d", port->number);
down (&port->sem);
+
+ if ((!port->tty) || (!port->tty->termios)) {
+ dbg(__FUNCTION__" - no tty structures");
+ goto exit;
+ }
+
+ cflag = port->tty->termios->c_cflag;
/* check that they really want us to change something */
if (old_termios) {
if ((cflag == old_termios->c_cflag) &&
@@ -427,11 +434,6 @@
}
}
- if ((!port->tty) || (!port->tty->termios)) {
- dbg(__FUNCTION__" - no tty structures");
- goto exit;
- }
-
/* set the port number */
/* firmware uses 1 based port numbering */
port_settings.port = port->number + 1;
@@ -675,6 +677,7 @@
MODULE_AUTHOR( DRIVER_AUTHOR );
MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL");
MODULE_PARM(debug, "i");
MODULE_PARM_DESC(debug, "Debug enabled or not");
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)