summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/console.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-25 15:58:40 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-25 15:58:40 -0700
commita60387ba3114fe087349df23fa82e5ad9d5b6ff2 (patch)
tree4cfdaf4d03da8cff76913b4a4de090e2cd99871a /drivers/usb/serial/console.c
parent0e81bef05e3b90f8319e79bf36e61341f7b6e189 (diff)
parentd5d1ceac2a47645780bd07fd7a670b14c4d995db (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (40 commits) USB: open disconnect race in usblcd USB: disconnect open race in legousbtower USB: open disconnect race in iowarrior USB: missing error check in emi62 USB: missing error check in emi26 USB: usb_serial_resume bug fix USB: remove new OHCI build warnings USB: amd5536udc - remove set_mwi() compiler warning USB: usbserial - fix potential deadlock between write() and IRQ usb: serial/pl2303: support for IO Data Device RSAQ5 USB: fix read vs. disconnect race in cytherm driver USB: fix locking in idmouse USB: fix interface sysfs file-creation bug USB: fix ssb_ohci_probe() build bug USB: pl2303: remove can't happen checks, set speed properly and report baud rate USB: mos7840: Clean up old checks and stuff USB rio500.c: fix check-after-use USB iowarrior.c: fix check-after-use USB: add URB_FREE_BUFFER to permissible flags USB: isd200: sort out USB/IDE dependancy mess ...
Diffstat (limited to 'drivers/usb/serial/console.c')
-rw-r--r--drivers/usb/serial/console.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/serial/console.c b/drivers/usb/serial/console.c
index 9386e216d68..0362654d3b5 100644
--- a/drivers/usb/serial/console.c
+++ b/drivers/usb/serial/console.c
@@ -164,6 +164,7 @@ static int usb_console_setup(struct console *co, char *options)
}
if (serial->type->set_termios) {
+ struct ktermios dummy;
/* build up a fake tty structure so that the open call has something
* to look at to get the cflag value */
tty = kzalloc(sizeof(*tty), GFP_KERNEL);
@@ -177,12 +178,13 @@ static int usb_console_setup(struct console *co, char *options)
kfree (tty);
return -ENOMEM;
}
+ memset(&dummy, 0, sizeof(struct ktermios));
termios->c_cflag = cflag;
tty->termios = termios;
port->tty = tty;
/* set up the initial termios settings */
- serial->type->set_termios(port, NULL);
+ serial->type->set_termios(port, &dummy);
port->tty = NULL;
kfree (termios);
kfree (tty);