X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fusb%2Fserial%2Fconsole.c;h=0362654d3b52e8aa53453c6cb499a8d247a9f8b2;hb=26adc0d5859788b74f86677538236f807e6d9021;hp=3d456b32c3166e5e02d756b64c8564f8b713eb9e;hpb=c0bc8721b8d0380ec69fa97578c91201201b05a9;p=linux-2.6-omap-h63xx.git diff --git a/drivers/usb/serial/console.c b/drivers/usb/serial/console.c index 3d456b32c31..0362654d3b5 100644 --- a/drivers/usb/serial/console.c +++ b/drivers/usb/serial/console.c @@ -17,11 +17,10 @@ #include #include #include +#include static int debug; -#include "usb-serial.h" - struct usbcons_info { int magic; int break_flag; @@ -66,7 +65,7 @@ static int usb_console_setup(struct console *co, char *options) struct usb_serial_port *port; int retval = 0; struct tty_struct *tty; - struct termios *termios; + struct ktermios *termios; dbg ("%s", __FUNCTION__); @@ -165,27 +164,27 @@ 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 = kmalloc (sizeof (*tty), GFP_KERNEL); + tty = kzalloc(sizeof(*tty), GFP_KERNEL); if (!tty) { err ("no more memory"); return -ENOMEM; } - termios = kmalloc (sizeof (*termios), GFP_KERNEL); + termios = kzalloc(sizeof(*termios), GFP_KERNEL); if (!termios) { err ("no more memory"); kfree (tty); return -ENOMEM; } - memset (tty, 0x00, sizeof(*tty)); - memset (termios, 0x00, sizeof(*termios)); + 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);