]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[PATCH] tty: switch to ktermios
authorAlan Cox <alan@lxorguk.ukuu.org.uk>
Fri, 8 Dec 2006 10:38:45 +0000 (02:38 -0800)
committerLinus Torvalds <torvalds@woody.osdl.org>
Fri, 8 Dec 2006 16:28:57 +0000 (08:28 -0800)
This is the grungy swap all the occurrences in the right places patch that
goes with the updates.  At this point we have the same functionality as
before (except that sgttyb() returns speeds not zero) and are ready to
begin turning new stuff on providing nobody reports lots of bugs

If you are a tty driver author converting an out of tree driver the only
impact should be termios->ktermios name changes for the speed/property
setting functions from your upper layers.

If you are implementing your own TCGETS function before then your driver
was broken already and its about to get a whole lot more painful for you so
please fix it 8)

Also fill in c_ispeed/ospeed on init for most devices, although the current
code will do this for you anyway but I'd like eventually to lose that extra
paranoia

[akpm@osdl.org: bluetooth fix]
[mp3@de.ibm.com: sclp fix]
[mp3@de.ibm.com: warning fix for tty3270]
[hugh@veritas.com: fix tty_ioctl powerpc build]
[jdike@addtoit.com: uml: fix ->set_termios declaration]
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Acked-by: Peter Oberparleiter <oberpar@de.ibm.com>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
113 files changed:
arch/um/drivers/line.c
arch/um/include/line.h
drivers/char/amiserial.c
drivers/char/cyclades.c
drivers/char/epca.c
drivers/char/esp.c
drivers/char/generic_serial.c
drivers/char/hvcs.c
drivers/char/hvsi.c
drivers/char/ip2/ip2main.c
drivers/char/isicom.c
drivers/char/istallion.c
drivers/char/moxa.c
drivers/char/mxser.c
drivers/char/mxser_new.c
drivers/char/n_r3964.c
drivers/char/n_tty.c
drivers/char/pcmcia/synclink_cs.c
drivers/char/pty.c
drivers/char/riscom8.c
drivers/char/rocket.c
drivers/char/ser_a2232.c
drivers/char/serial167.c
drivers/char/specialix.c
drivers/char/stallion.c
drivers/char/sx.c
drivers/char/synclink.c
drivers/char/synclink_gt.c
drivers/char/synclinkmp.c
drivers/char/tty_ioctl.c
drivers/char/vme_scc.c
drivers/isdn/capi/capi.c
drivers/isdn/gigaset/interface.c
drivers/isdn/i4l/isdn_tty.c
drivers/net/irda/irtty-sir.c
drivers/s390/char/sclp_tty.c
drivers/s390/char/tty3270.c
drivers/serial/21285.c
drivers/serial/68328serial.c
drivers/serial/68360serial.c
drivers/serial/8250.c
drivers/serial/amba-pl010.c
drivers/serial/amba-pl011.c
drivers/serial/atmel_serial.c
drivers/serial/clps711x.c
drivers/serial/crisv10.c
drivers/serial/crisv10.h
drivers/serial/dz.c
drivers/serial/icom.c
drivers/serial/imx.c
drivers/serial/ioc3_serial.c
drivers/serial/ioc4_serial.c
drivers/serial/ip22zilog.c
drivers/serial/jsm/jsm_tty.c
drivers/serial/m32r_sio.c
drivers/serial/mcfserial.c
drivers/serial/mpc52xx_uart.c
drivers/serial/mpsc.c
drivers/serial/mux.c
drivers/serial/netx-serial.c
drivers/serial/pmac_zilog.c
drivers/serial/pmac_zilog.h
drivers/serial/pxa.c
drivers/serial/s3c2410.c
drivers/serial/sa1100.c
drivers/serial/serial_core.c
drivers/serial/serial_lh7a40x.c
drivers/serial/serial_txx9.c
drivers/serial/sh-sci.c
drivers/serial/sn_console.c
drivers/serial/sunhv.c
drivers/serial/sunsab.c
drivers/serial/sunsu.c
drivers/serial/sunzilog.c
drivers/serial/uartlite.c
drivers/serial/v850e_uart.c
drivers/serial/vr41xx_siu.c
drivers/tc/zs.c
drivers/usb/class/cdc-acm.c
drivers/usb/gadget/serial.c
drivers/usb/serial/ark3116.c
drivers/usb/serial/belkin_sa.c
drivers/usb/serial/console.c
drivers/usb/serial/cp2101.c
drivers/usb/serial/cypress_m8.c
drivers/usb/serial/digi_acceleport.c
drivers/usb/serial/empeg.c
drivers/usb/serial/ftdi_sio.c
drivers/usb/serial/io_edgeport.c
drivers/usb/serial/io_ti.c
drivers/usb/serial/ir-usb.c
drivers/usb/serial/keyspan.c
drivers/usb/serial/keyspan.h
drivers/usb/serial/keyspan_pda.c
drivers/usb/serial/kl5kusb105.c
drivers/usb/serial/kobil_sct.c
drivers/usb/serial/mct_u232.c
drivers/usb/serial/mos7720.c
drivers/usb/serial/mos7840.c
drivers/usb/serial/option.c
drivers/usb/serial/pl2303.c
drivers/usb/serial/sierra.c
drivers/usb/serial/ti_usb_3410_5052.c
drivers/usb/serial/usb-serial.c
drivers/usb/serial/visor.c
drivers/usb/serial/whiteheat.c
include/asm-generic/termios.h
include/asm-powerpc/termbits.h
include/linux/generic_serial.h
include/linux/isdn.h
include/linux/serial_core.h
include/linux/usb/serial.h
net/bluetooth/rfcomm/tty.c

index aa3090d05a8f7f39fd38eabd332e0c01e4271a41..83301e1ef67cbe24dbe6ee73f70b21c756ff87f8 100644 (file)
@@ -246,7 +246,7 @@ out_up:
        return ret;
 }
 
-void line_set_termios(struct tty_struct *tty, struct termios * old)
+void line_set_termios(struct tty_struct *tty, struct ktermios * old)
 {
        /* nothing */
 }
index 214ee76c40df51ac4d7fe03142d7700fe1bae2bd..5f232ae89fbb8440a7dd4b4830011bb401f437d4 100644 (file)
@@ -76,7 +76,7 @@ extern int line_setup(struct line *lines, unsigned int sizeof_lines,
 extern int line_write(struct tty_struct *tty, const unsigned char *buf,
                      int len);
 extern void line_put_char(struct tty_struct *tty, unsigned char ch);
-extern void line_set_termios(struct tty_struct *tty, struct termios * old);
+extern void line_set_termios(struct tty_struct *tty, struct ktermios * old);
 extern int line_chars_in_buffer(struct tty_struct *tty);
 extern void line_flush_buffer(struct tty_struct *tty);
 extern void line_flush_chars(struct tty_struct *tty);
index 66086fa2d59a2c38188f854ecc8a55bb5081eac3..feb4ac802a0d1e44f8fef6d24a7e7638a0d3b563 100644 (file)
@@ -104,7 +104,7 @@ static struct async_struct *IRQ_ports;
 
 static unsigned char current_ctl_bits;
 
-static void change_speed(struct async_struct *info, struct termios *old);
+static void change_speed(struct async_struct *info, struct ktermios *old);
 static void rs_wait_until_sent(struct tty_struct *tty, int timeout);
 
 
@@ -694,7 +694,7 @@ static void shutdown(struct async_struct * info)
  * the specified baud rate for a serial port.
  */
 static void change_speed(struct async_struct *info,
-                        struct termios *old_termios)
+                        struct ktermios *old_termios)
 {
        int     quot = 0, baud_base, baud;
        unsigned cflag, cval = 0;
@@ -1365,7 +1365,7 @@ static int rs_ioctl(struct tty_struct *tty, struct file * file,
        return 0;
 }
 
-static void rs_set_termios(struct tty_struct *tty, struct termios *old_termios)
+static void rs_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
 {
        struct async_struct *info = (struct async_struct *)tty->driver_data;
        unsigned long flags;
index acb2de5e3a985db72fa6c94c05017ca162a9d7b1..3bb4e534c14eb1b40572a2cada24c8ae9dd9673c 100644 (file)
@@ -4101,7 +4101,7 @@ cy_ioctl(struct tty_struct *tty, struct file * file,
  * where old == NULL, and try to do something rational.
  */
 static void
-cy_set_termios(struct tty_struct *tty, struct termios * old_termios)
+cy_set_termios(struct tty_struct *tty, struct ktermios * old_termios)
 {
   struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
 
index 7c71eb779802a9f9ed1a8dde50b3943b86c25b96..a0f822c9d74def65e14f97fb319d782b305ef19d 100644 (file)
@@ -199,7 +199,7 @@ static int pc_ioctl(struct tty_struct *, struct file *,
                     unsigned int, unsigned long);
 static int info_ioctl(struct tty_struct *, struct file *,
                     unsigned int, unsigned long);
-static void pc_set_termios(struct tty_struct *, struct termios *);
+static void pc_set_termios(struct tty_struct *, struct ktermios *);
 static void do_softint(struct work_struct *work);
 static void pc_stop(struct tty_struct *);
 static void pc_start(struct tty_struct *);
@@ -1236,6 +1236,8 @@ static int __init pc_init(void)
        pc_driver->init_termios.c_oflag = 0;
        pc_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL | HUPCL;
        pc_driver->init_termios.c_lflag = 0;
+       pc_driver->init_termios.c_ispeed = 9600;
+       pc_driver->init_termios.c_ospeed = 9600;
        pc_driver->flags = TTY_DRIVER_REAL_RAW;
        tty_set_operations(pc_driver, &pc_ops);
 
@@ -1250,6 +1252,8 @@ static int __init pc_init(void)
        pc_info->init_termios.c_oflag = 0;
        pc_info->init_termios.c_lflag = 0;
        pc_info->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL;
+       pc_info->init_termios.c_ispeed = 9600;
+       pc_info->init_termios.c_ospeed = 9600;
        pc_info->flags = TTY_DRIVER_REAL_RAW;
        tty_set_operations(pc_info, &info_ops);
 
@@ -1999,7 +2003,7 @@ static void epcaparam(struct tty_struct *tty, struct channel *ch)
 { /* Begin epcaparam */
 
        unsigned int cmdHead;
-       struct termios *ts;
+       struct ktermios *ts;
        struct board_chan __iomem *bc;
        unsigned mval, hflow, cflag, iflag;
 
@@ -2114,7 +2118,7 @@ static void receive_data(struct channel *ch)
 { /* Begin receive_data */
 
        unchar *rptr;
-       struct termios *ts = NULL;
+       struct ktermios *ts = NULL;
        struct tty_struct *tty;
        struct board_chan __iomem *bc;
        int dataToRead, wrapgap, bytesAvailable;
@@ -2362,12 +2366,14 @@ static int pc_ioctl(struct tty_struct *tty, struct file * file,
        switch (cmd) 
        { /* Begin switch cmd */
 
+#if 0  /* Handled by calling layer properly */
                case TCGETS:
-                       if (copy_to_user(argp, tty->termios, sizeof(struct termios)))
+                       if (copy_to_user(argp, tty->termios, sizeof(struct ktermios)))
                                return -EFAULT;
                        return 0;
                case TCGETA:
                        return get_termio(tty, argp);
+#endif
                case TCSBRK:    /* SVID version: non-zero arg --> no break */
                        retval = tty_check_change(tty);
                        if (retval)
@@ -2536,7 +2542,7 @@ static int pc_ioctl(struct tty_struct *tty, struct file * file,
 
 /* --------------------- Begin pc_set_termios  ----------------------- */
 
-static void pc_set_termios(struct tty_struct *tty, struct termios *old_termios)
+static void pc_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
 { /* Begin pc_set_termios */
 
        struct channel *ch;
index 93b5519625130362874ed36d48fc2f0fafe630f4..d1bfbaa2aa0284f62a2d400ed8e74d34221106eb 100644 (file)
@@ -1915,7 +1915,7 @@ static int rs_ioctl(struct tty_struct *tty, struct file * file,
        return 0;
 }
 
-static void rs_set_termios(struct tty_struct *tty, struct termios *old_termios)
+static void rs_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
 {
        struct esp_struct *info = (struct esp_struct *)tty->driver_data;
        unsigned long flags;
index 87127e49c0dbf8a07aeae5fd6cee1f5be3d0a397..e769811e74172d36bff0d845a9fab7327299b158 100644 (file)
@@ -718,11 +718,11 @@ static unsigned int     gs_baudrates[] = {
 
 
 void gs_set_termios (struct tty_struct * tty, 
-                     struct termios * old_termios)
+                     struct ktermios * old_termios)
 {
        struct gs_port *port;
        int baudrate, tmp, rv;
-       struct termios *tiosp;
+       struct ktermios *tiosp;
 
        func_enter();
 
index d090622f1dea2ec599040fd6aa0d967941d775ce..207f7343ba60df8b5aa2b998cc6184bc1f37cf0f 100644 (file)
@@ -192,11 +192,13 @@ MODULE_VERSION(HVCS_DRIVER_VERSION);
  * that will cause echoing or we'll go into recursive loop echoing chars back
  * and forth with the console drivers.
  */
-static struct termios hvcs_tty_termios = {
+static struct ktermios hvcs_tty_termios = {
        .c_iflag = IGNBRK | IGNPAR,
        .c_oflag = OPOST,
        .c_cflag = B38400 | CS8 | CREAD | HUPCL,
-       .c_cc = INIT_C_CC
+       .c_cc = INIT_C_CC,
+       .c_ispeed = 38400,
+       .c_ospeed = 38400
 };
 
 /*
index 82a41d5b4ed0b595d8056b114673a8fd36fcd6f6..d7806834fc171ad07f08c90f0e5b20a30c000987 100644 (file)
@@ -1161,6 +1161,8 @@ static int __init hvsi_init(void)
        hvsi_driver->type = TTY_DRIVER_TYPE_SYSTEM;
        hvsi_driver->init_termios = tty_std_termios;
        hvsi_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL;
+       hvsi_driver->init_termios.c_ispeed = 9600;
+       hvsi_driver->init_termios.c_ospeed = 9600;
        hvsi_driver->flags = TTY_DRIVER_REAL_RAW;
        tty_set_operations(hvsi_driver, &hvsi_ops);
 
index 6810b7bbcbb73b0845b5ed341cd9ed691cbdd610..7c70310a49b5b48a771a86f188f8489521c07123 100644 (file)
@@ -177,7 +177,7 @@ static int  ip2_write_room(PTTY);
 static int  ip2_chars_in_buf(PTTY);
 static void ip2_flush_buffer(PTTY);
 static int  ip2_ioctl(PTTY, struct file *, UINT, ULONG);
-static void ip2_set_termios(PTTY, struct termios *);
+static void ip2_set_termios(PTTY, struct ktermios *);
 static void ip2_set_line_discipline(PTTY);
 static void ip2_throttle(PTTY);
 static void ip2_unthrottle(PTTY);
@@ -198,7 +198,7 @@ static void do_status(struct work_struct *);
 
 static void ip2_wait_until_sent(PTTY,int);
 
-static void set_params (i2ChanStrPtr, struct termios *);
+static void set_params (i2ChanStrPtr, struct ktermios *);
 static int get_serial_info(i2ChanStrPtr, struct serial_struct __user *);
 static int set_serial_info(i2ChanStrPtr, struct serial_struct __user *);
 
@@ -2398,7 +2398,7 @@ set_serial_info( i2ChanStrPtr pCh, struct serial_struct __user *new_info )
 /*                                                                            */
 /******************************************************************************/
 static void
-ip2_set_termios( PTTY tty, struct termios *old_termios )
+ip2_set_termios( PTTY tty, struct ktermios *old_termios )
 {
        i2ChanStrPtr pCh = (i2ChanStrPtr)tty->driver_data;
 
@@ -2440,11 +2440,11 @@ ip2_set_line_discipline ( PTTY tty )
 /* change.                                                                    */
 /******************************************************************************/
 static void
-set_params( i2ChanStrPtr pCh, struct termios *o_tios )
+set_params( i2ChanStrPtr pCh, struct ktermios *o_tios )
 {
        tcflag_t cflag, iflag, lflag;
        char stop_char, start_char;
-       struct termios dummy;
+       struct ktermios dummy;
 
        lflag = pCh->pTTY->termios->c_lflag;
        cflag = pCh->pTTY->termios->c_cflag;
index 1637c1d9a4baf9f801da84c1e99bd39986ac3ed3..29e28b756336ae5804485422eef9a7a0bf93ec12 100644 (file)
@@ -1399,7 +1399,7 @@ static int isicom_ioctl(struct tty_struct *tty, struct file *filp,
 
 /* set_termios et all */
 static void isicom_set_termios(struct tty_struct *tty,
-       struct termios *old_termios)
+       struct ktermios *old_termios)
 {
        struct isi_port *port = tty->driver_data;
 
index b6f0d036a760acbf0e0b41239f28fbb9f6cb8f1e..0ef2523733ee88ddf7853d9b788891c1c418eb61 100644 (file)
@@ -194,9 +194,11 @@ static struct tty_struct   *stli_txcooktty;
  *     with this termios initially. Basically all it defines is a raw port
  *     at 9600 baud, 8 data bits, no parity, 1 stop bit.
  */
-static struct termios          stli_deftermios = {
+static struct ktermios         stli_deftermios = {
        .c_cflag        = (B9600 | CS8 | CREAD | HUPCL | CLOCAL),
        .c_cc           = INIT_C_CC,
+       .c_ispeed       = 9600,
+       .c_ospeed       = 9600,
 };
 
 /*
@@ -639,7 +641,7 @@ static void stli_flushchars(struct tty_struct *tty);
 static int     stli_writeroom(struct tty_struct *tty);
 static int     stli_charsinbuffer(struct tty_struct *tty);
 static int     stli_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg);
-static void    stli_settermios(struct tty_struct *tty, struct termios *old);
+static void    stli_settermios(struct tty_struct *tty, struct ktermios *old);
 static void    stli_throttle(struct tty_struct *tty);
 static void    stli_unthrottle(struct tty_struct *tty);
 static void    stli_stop(struct tty_struct *tty);
@@ -669,7 +671,7 @@ static int  stli_cmdwait(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, v
 static void    stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback);
 static void    __stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback);
 static void    stli_dodelaycmd(stliport_t *portp, cdkctrl_t __iomem *cp);
-static void    stli_mkasyport(stliport_t *portp, asyport_t *pp, struct termios *tiosp);
+static void    stli_mkasyport(stliport_t *portp, asyport_t *pp, struct ktermios *tiosp);
 static void    stli_mkasysigs(asysigs_t *sp, int dtr, int rts);
 static long    stli_mktiocm(unsigned long sigvalue);
 static void    stli_read(stlibrd_t *brdp, stliport_t *portp);
@@ -1889,11 +1891,11 @@ static int stli_ioctl(struct tty_struct *tty, struct file *file, unsigned int cm
  *     Looks like it is true for the current ttys implementation..!!
  */
 
-static void stli_settermios(struct tty_struct *tty, struct termios *old)
+static void stli_settermios(struct tty_struct *tty, struct ktermios *old)
 {
        stliport_t *portp;
        stlibrd_t *brdp;
-       struct termios *tiosp;
+       struct ktermios *tiosp;
        asyport_t aport;
 
        if (tty == NULL)
@@ -2730,7 +2732,7 @@ static void stli_poll(unsigned long arg)
  *     the slave.
  */
 
-static void stli_mkasyport(stliport_t *portp, asyport_t *pp, struct termios *tiosp)
+static void stli_mkasyport(stliport_t *portp, asyport_t *pp, struct ktermios *tiosp)
 {
        memset(pp, 0, sizeof(asyport_t));
 
index 8b316953173dd5c168b2c00985c513207ea5c3ba..f391a24a1b442c1e8eb4aaf1c1857d015dfdc89b 100644 (file)
@@ -234,7 +234,7 @@ static void moxa_put_char(struct tty_struct *, unsigned char);
 static int moxa_ioctl(struct tty_struct *, struct file *, unsigned int, unsigned long);
 static void moxa_throttle(struct tty_struct *);
 static void moxa_unthrottle(struct tty_struct *);
-static void moxa_set_termios(struct tty_struct *, struct termios *);
+static void moxa_set_termios(struct tty_struct *, struct ktermios *);
 static void moxa_stop(struct tty_struct *);
 static void moxa_start(struct tty_struct *);
 static void moxa_hangup(struct tty_struct *);
@@ -261,7 +261,7 @@ static void MoxaPortEnable(int);
 static void MoxaPortDisable(int);
 static long MoxaPortGetMaxBaud(int);
 static long MoxaPortSetBaud(int, long);
-static int MoxaPortSetTermio(int, struct termios *, speed_t);
+static int MoxaPortSetTermio(int, struct ktermios *, speed_t);
 static int MoxaPortGetLineOut(int, int *, int *);
 static void MoxaPortLineCtrl(int, int, int);
 static void MoxaPortFlowCtrl(int, int, int, int, int, int);
@@ -355,6 +355,8 @@ static int __init moxa_init(void)
        moxaDriver->init_termios.c_oflag = 0;
        moxaDriver->init_termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL | HUPCL;
        moxaDriver->init_termios.c_lflag = 0;
+       moxaDriver->init_termios.c_ispeed = 9600;
+       moxaDriver->init_termios.c_ospeed = 9600;
        moxaDriver->flags = TTY_DRIVER_REAL_RAW;
        tty_set_operations(moxaDriver, &moxa_ops);
 
@@ -864,7 +866,7 @@ static void moxa_unthrottle(struct tty_struct *tty)
 }
 
 static void moxa_set_termios(struct tty_struct *tty,
-                            struct termios *old_termios)
+                            struct ktermios *old_termios)
 {
        struct moxa_str *ch = (struct moxa_str *) tty->driver_data;
 
@@ -978,7 +980,7 @@ static void moxa_poll(unsigned long ignored)
 
 static void set_tty_param(struct tty_struct *tty)
 {
-       register struct termios *ts;
+       register struct ktermios *ts;
        struct moxa_str *ch;
        int rts, cts, txflow, rxflow, xany;
 
@@ -1149,7 +1151,7 @@ static void shut_down(struct moxa_str *ch)
 static void receive_data(struct moxa_str *ch)
 {
        struct tty_struct *tp;
-       struct termios *ts;
+       struct ktermios *ts;
        unsigned long flags;
 
        ts = NULL;
@@ -1912,9 +1914,9 @@ int MoxaPortsOfCard(int cardno)
  *
  *      Function 12:    Configure the port.
  *      Syntax:
- *      int  MoxaPortSetTermio(int port, struct termios *termio, speed_t baud);
+ *      int  MoxaPortSetTermio(int port, struct ktermios *termio, speed_t baud);
  *           int port           : port number (0 - 127)
- *           struct termios * termio : termio structure pointer
+ *           struct ktermios * termio : termio structure pointer
  *          speed_t baud       : baud rate
  *
  *           return:    -1      : this port is invalid or termio == NULL
@@ -2195,7 +2197,7 @@ long MoxaPortSetBaud(int port, long baud)
        return (baud);
 }
 
-int MoxaPortSetTermio(int port, struct termios *termio, speed_t baud)
+int MoxaPortSetTermio(int port, struct ktermios *termio, speed_t baud)
 {
        void __iomem *ofsAddr;
        tcflag_t cflag;
index 2dc49be144e64b8821f0edd70adb62b5d20fb5f4..c063359baf78ea1f2f020124e4b5f18e598e9db0 100644 (file)
@@ -328,8 +328,8 @@ struct mxser_struct {
        int xmit_tail;
        int xmit_cnt;
        struct work_struct tqueue;
-       struct termios normal_termios;
-       struct termios callout_termios;
+       struct ktermios normal_termios;
+       struct ktermios callout_termios;
        wait_queue_head_t open_wait;
        wait_queue_head_t close_wait;
        wait_queue_head_t delta_msr_wait;
@@ -364,8 +364,8 @@ static int mxserBoardCAP[MXSER_BOARDS] = {
 static struct tty_driver *mxvar_sdriver;
 static struct mxser_struct mxvar_table[MXSER_PORTS];
 static struct tty_struct *mxvar_tty[MXSER_PORTS + 1];
-static struct termios *mxvar_termios[MXSER_PORTS + 1];
-static struct termios *mxvar_termios_locked[MXSER_PORTS + 1];
+static struct ktermios *mxvar_termios[MXSER_PORTS + 1];
+static struct ktermios *mxvar_termios_locked[MXSER_PORTS + 1];
 static struct mxser_log mxvar_log;
 static int mxvar_diagflag;
 static unsigned char mxser_msr[MXSER_PORTS + 1];
@@ -402,7 +402,7 @@ static int mxser_ioctl(struct tty_struct *, struct file *, uint, ulong);
 static int mxser_ioctl_special(unsigned int, void __user *);
 static void mxser_throttle(struct tty_struct *);
 static void mxser_unthrottle(struct tty_struct *);
-static void mxser_set_termios(struct tty_struct *, struct termios *);
+static void mxser_set_termios(struct tty_struct *, struct ktermios *);
 static void mxser_stop(struct tty_struct *);
 static void mxser_start(struct tty_struct *);
 static void mxser_hangup(struct tty_struct *);
@@ -414,7 +414,7 @@ static void mxser_check_modem_status(struct mxser_struct *, int);
 static int mxser_block_til_ready(struct tty_struct *, struct file *, struct mxser_struct *);
 static int mxser_startup(struct mxser_struct *);
 static void mxser_shutdown(struct mxser_struct *);
-static int mxser_change_speed(struct mxser_struct *, struct termios *old_termios);
+static int mxser_change_speed(struct mxser_struct *, struct ktermios *old_termios);
 static int mxser_get_serial_info(struct mxser_struct *, struct serial_struct __user *);
 static int mxser_set_serial_info(struct mxser_struct *, struct serial_struct __user *);
 static int mxser_get_lsr_info(struct mxser_struct *, unsigned int __user *);
@@ -726,6 +726,8 @@ static int mxser_init(void)
        mxvar_sdriver->subtype = SERIAL_TYPE_NORMAL;
        mxvar_sdriver->init_termios = tty_std_termios;
        mxvar_sdriver->init_termios.c_cflag = B9600|CS8|CREAD|HUPCL|CLOCAL;
+       mxvar_sdriver->init_termios.c_ispeed = 9600;
+       mxvar_sdriver->init_termios.c_ospeed = 9600;
        mxvar_sdriver->flags = TTY_DRIVER_REAL_RAW;
        tty_set_operations(mxvar_sdriver, &mxser_ops);
        mxvar_sdriver->ttys = mxvar_tty;
@@ -1749,7 +1751,7 @@ static void mxser_unthrottle(struct tty_struct *tty)
        /* MX_UNLOCK(&info->slock); */
 }
 
-static void mxser_set_termios(struct tty_struct *tty, struct termios *old_termios)
+static void mxser_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
 {
        struct mxser_struct *info = tty->driver_data;
        unsigned long flags;
@@ -2541,7 +2543,7 @@ static void mxser_shutdown(struct mxser_struct *info)
  * This routine is called to set the UART divisor registers to match
  * the specified baud rate for a serial port.
  */
-static int mxser_change_speed(struct mxser_struct *info, struct termios *old_termios)
+static int mxser_change_speed(struct mxser_struct *info, struct ktermios *old_termios)
 {
        unsigned cflag, cval, fcr;
        int ret = 0;
index 369d2742d6bedbd74cb3e1147da205c397241eeb..efa8076c33e047db432d4085713b2f586179ff26 100644 (file)
@@ -266,8 +266,8 @@ struct mxser_port {
        int xmit_tail;
        int xmit_cnt;
 
-       struct termios normal_termios;
-       struct termios callout_termios;
+       struct ktermios normal_termios;
+       struct ktermios callout_termios;
 
        struct mxser_mon mon_data;
 
@@ -512,7 +512,7 @@ static int mxser_set_baud(struct mxser_port *info, long newspd)
  * the specified baud rate for a serial port.
  */
 static int mxser_change_speed(struct mxser_port *info,
-               struct termios *old_termios)
+               struct ktermios *old_termios)
 {
        unsigned cflag, cval, fcr;
        int ret = 0;
@@ -1966,7 +1966,7 @@ static void mxser_start(struct tty_struct *tty)
        spin_unlock_irqrestore(&info->slock, flags);
 }
 
-static void mxser_set_termios(struct tty_struct *tty, struct termios *old_termios)
+static void mxser_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
 {
        struct mxser_port *info = tty->driver_data;
        unsigned long flags;
index 203dc2b661d5cc8b4bba97e79b893650c0c3773b..103d338f21e24483c36adc71f9433daf017de0f4 100644 (file)
@@ -142,7 +142,7 @@ static ssize_t r3964_write(struct tty_struct * tty, struct file * file,
                       const unsigned char * buf, size_t nr);
 static int r3964_ioctl(struct tty_struct * tty, struct file * file,
                        unsigned int cmd, unsigned long arg);
-static void r3964_set_termios(struct tty_struct *tty, struct termios * old);
+static void r3964_set_termios(struct tty_struct *tty, struct ktermios * old);
 static unsigned int r3964_poll(struct tty_struct * tty, struct file * file,
                      struct poll_table_struct  *wait);
 static void r3964_receive_buf(struct tty_struct *tty, const unsigned char *cp,
@@ -1347,7 +1347,7 @@ static int r3964_ioctl(struct tty_struct * tty, struct file * file,
    }
 }
 
-static void r3964_set_termios(struct tty_struct *tty, struct termios * old)
+static void r3964_set_termios(struct tty_struct *tty, struct ktermios * old)
 {
    TRACE_L("set_termios");
 }
index 603b9ade5eb089f16f041fc15e4876417a6c1505..e96a00fe13891b6f5f9fae1b2e1e6f1054d37956 100644 (file)
@@ -994,7 +994,7 @@ int is_ignored(int sig)
  *     when the ldisc is closed.
  */
  
-static void n_tty_set_termios(struct tty_struct *tty, struct termios * old)
+static void n_tty_set_termios(struct tty_struct *tty, struct ktermios * old)
 {
        if (!tty)
                return;
index 74d21c1c104fe10b5dcb20be4a8e5d8907082e4a..5152cedd8878ff235bcbe2a0b0a2d593e7ed08dd 100644 (file)
@@ -2375,7 +2375,7 @@ static int ioctl_common(MGSLPC_INFO *info, unsigned int cmd, unsigned long arg)
  *     tty             pointer to tty structure
  *     termios         pointer to buffer to hold returned old termios
  */
-static void mgslpc_set_termios(struct tty_struct *tty, struct termios *old_termios)
+static void mgslpc_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
 {
        MGSLPC_INFO *info = (MGSLPC_INFO *)tty->driver_data;
        unsigned long flags;
index 80d3eedd7f96f32997a69fa24f2134b38c8d1f1f..c07a1b5cd05d3f31204fab9eb7810e9704d96e08 100644 (file)
@@ -218,7 +218,7 @@ out:
        return retval;
 }
 
-static void pty_set_termios(struct tty_struct *tty, struct termios *old_termios)
+static void pty_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
 {
         tty->termios->c_cflag &= ~(CSIZE | PARENB);
         tty->termios->c_cflag |= (CS8 | CREAD);
@@ -272,6 +272,8 @@ static void __init legacy_pty_init(void)
        pty_driver->init_termios.c_oflag = 0;
        pty_driver->init_termios.c_cflag = B38400 | CS8 | CREAD;
        pty_driver->init_termios.c_lflag = 0;
+       pty_driver->init_termios.c_ispeed = 38400;
+       pty_driver->init_termios.c_ospeed = 38400;
        pty_driver->flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_REAL_RAW;
        pty_driver->other = pty_slave_driver;
        tty_set_operations(pty_driver, &pty_ops);
@@ -286,6 +288,8 @@ static void __init legacy_pty_init(void)
        pty_slave_driver->subtype = PTY_TYPE_SLAVE;
        pty_slave_driver->init_termios = tty_std_termios;
        pty_slave_driver->init_termios.c_cflag = B38400 | CS8 | CREAD;
+       pty_slave_driver->init_termios.c_ispeed = 38400;
+       pty_slave_driver->init_termios.c_ospeed = 38400;
        pty_slave_driver->flags = TTY_DRIVER_RESET_TERMIOS |
                                        TTY_DRIVER_REAL_RAW;
        pty_slave_driver->other = pty_driver;
@@ -366,6 +370,8 @@ static void __init unix98_pty_init(void)
        ptm_driver->init_termios.c_oflag = 0;
        ptm_driver->init_termios.c_cflag = B38400 | CS8 | CREAD;
        ptm_driver->init_termios.c_lflag = 0;
+       ptm_driver->init_termios.c_ispeed = 38400;
+       ptm_driver->init_termios.c_ospeed = 38400;
        ptm_driver->flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_REAL_RAW |
                TTY_DRIVER_DYNAMIC_DEV | TTY_DRIVER_DEVPTS_MEM;
        ptm_driver->other = pts_driver;
@@ -381,6 +387,8 @@ static void __init unix98_pty_init(void)
        pts_driver->subtype = PTY_TYPE_SLAVE;
        pts_driver->init_termios = tty_std_termios;
        pts_driver->init_termios.c_cflag = B38400 | CS8 | CREAD;
+       pts_driver->init_termios.c_ispeed = 38400;
+       pts_driver->init_termios.c_ospeed = 38400;
        pts_driver->flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_REAL_RAW |
                TTY_DRIVER_DYNAMIC_DEV | TTY_DRIVER_DEVPTS_MEM;
        pts_driver->other = ptm_driver;
index 0a77bfcd5b5e8a571a98fded62d3f39653d3cb5b..e2a94bfb2a436dd5d24e68fb8388721351a6acdb 100644 (file)
@@ -1539,7 +1539,7 @@ static void rc_hangup(struct tty_struct * tty)
        wake_up_interruptible(&port->open_wait);
 }
 
-static void rc_set_termios(struct tty_struct * tty, struct termios * old_termios)
+static void rc_set_termios(struct tty_struct * tty, struct ktermios * old_termios)
 {
        struct riscom_port *port = (struct riscom_port *)tty->driver_data;
        unsigned long flags;
@@ -1614,6 +1614,8 @@ static inline int rc_init_drivers(void)
        riscom_driver->init_termios = tty_std_termios;
        riscom_driver->init_termios.c_cflag =
                B9600 | CS8 | CREAD | HUPCL | CLOCAL;
+       riscom_driver->init_termios.c_ispeed = 9600;
+       riscom_driver->init_termios.c_ospeed = 9600;
        riscom_driver->flags = TTY_DRIVER_REAL_RAW;
        tty_set_operations(riscom_driver, &riscom_ops);
        if ((error = tty_register_driver(riscom_driver)))  {
index 4fdf52e9f3b12591d1445b5455cb81f7c7b6e36e..e94a62e30fc4f5c01be2343a28468675ba9ca8c8 100644 (file)
@@ -712,7 +712,7 @@ static void init_r_port(int board, int aiop, int chan, struct pci_dev *pci_dev)
  *  user mode into the driver (exception handler).  *info CD manipulation is spinlock protected.
  */
 static void configure_r_port(struct r_port *info,
-                            struct termios *old_termios)
+                            struct ktermios *old_termios)
 {
        unsigned cflag;
        unsigned long flags;
@@ -1194,7 +1194,7 @@ static void rp_close(struct tty_struct *tty, struct file *filp)
 }
 
 static void rp_set_termios(struct tty_struct *tty,
-                          struct termios *old_termios)
+                          struct ktermios *old_termios)
 {
        struct r_port *info = (struct r_port *) tty->driver_data;
        CHANNEL_t *cp;
@@ -2214,7 +2214,7 @@ static int __init init_PCI(int boards_found)
        int count = 0;
 
        /*  Work through the PCI device list, pulling out ours */
-       while ((dev = pci_find_device(PCI_VENDOR_ID_RP, PCI_ANY_ID, dev))) {
+       while ((dev = pci_get_device(PCI_VENDOR_ID_RP, PCI_ANY_ID, dev))) {
                if (register_PCI(count + boards_found, dev))
                        count++;
        }
@@ -2436,6 +2436,8 @@ static int __init rp_init(void)
        rocket_driver->init_termios = tty_std_termios;
        rocket_driver->init_termios.c_cflag =
            B9600 | CS8 | CREAD | HUPCL | CLOCAL;
+       rocket_driver->init_termios.c_ispeed = 9600;
+       rocket_driver->init_termios.c_ospeed = 9600;
 #ifdef ROCKET_SOFT_FLOW
        rocket_driver->flags |= TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV;
 #endif
index 4217d38caef90f83e7272b68c21a8d2202a1eb3f..75de5f66517aeb81bf3cec37db24baebaa03379a 100644 (file)
@@ -695,6 +695,8 @@ static int a2232_init_drivers(void)
        a2232_driver->init_termios = tty_std_termios;
        a2232_driver->init_termios.c_cflag =
                B9600 | CS8 | CREAD | HUPCL | CLOCAL;
+       a2232_driver->init_termios.c_ispeed = 9600;
+       a2232_driver->init_termios.c_ospeed = 9600;
        a2232_driver->flags = TTY_DRIVER_REAL_RAW;
        tty_set_operations(a2232_driver, &a2232_ops);
        if ((error = tty_register_driver(a2232_driver))) {
index 9ba13af234be4e041d323eddb5a8c58eb3ec264d..af50d32ae2c75a97fef06148de07d97c5713ef24 100644 (file)
@@ -1695,7 +1695,7 @@ cy_ioctl(struct tty_struct *tty, struct file * file,
 
 
 static void
-cy_set_termios(struct tty_struct *tty, struct termios * old_termios)
+cy_set_termios(struct tty_struct *tty, struct ktermios * old_termios)
 {
   struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
 
index 99137ab66b625f0e9e4d16dc836f6b13ac088aa2..20946f5127e0ca97b8b902fe3e22ae464722bcbf 100644 (file)
@@ -2311,7 +2311,7 @@ static void sx_hangup(struct tty_struct * tty)
 }
 
 
-static void sx_set_termios(struct tty_struct * tty, struct termios * old_termios)
+static void sx_set_termios(struct tty_struct * tty, struct ktermios * old_termios)
 {
        struct specialix_port *port = (struct specialix_port *)tty->driver_data;
        unsigned long flags;
@@ -2400,6 +2400,8 @@ static int sx_init_drivers(void)
        specialix_driver->init_termios = tty_std_termios;
        specialix_driver->init_termios.c_cflag =
                B9600 | CS8 | CREAD | HUPCL | CLOCAL;
+       specialix_driver->init_termios.c_ispeed = 9600;
+       specialix_driver->init_termios.c_ospeed = 9600;
        specialix_driver->flags = TTY_DRIVER_REAL_RAW;
        tty_set_operations(specialix_driver, &sx_ops);
 
@@ -2475,7 +2477,7 @@ static int __init specialix_init(void)
                                i++;
                                continue;
                        }
-                       pdev = pci_find_device (PCI_VENDOR_ID_SPECIALIX,
+                       pdev = pci_get_device (PCI_VENDOR_ID_SPECIALIX,
                                                PCI_DEVICE_ID_SPECIALIX_IO8,
                                                pdev);
                        if (!pdev) break;
@@ -2491,6 +2493,9 @@ static int __init specialix_init(void)
                        if (!sx_probe(&sx_board[i]))
                                found ++;
                }
+               /* May exit pci_get sequence early with lots of boards */
+               if (pdev != NULL)
+                       pci_dev_put(pdev);
        }
 #endif
 
index a547c0c8fb2af7226474ca697526983bee850b0a..71bfdccfb42e71601627d429929799122dfa7f0c 100644 (file)
@@ -141,9 +141,11 @@ static struct tty_driver   *stl_serial;
  *     with this termios initially. Basically all it defines is a raw port
  *     at 9600, 8 data bits, 1 stop bit.
  */
-static struct termios          stl_deftermios = {
+static struct ktermios         stl_deftermios = {
        .c_cflag        = (B9600 | CS8 | CREAD | HUPCL | CLOCAL),
        .c_cc           = INIT_C_CC,
+       .c_ispeed       = 9600,
+       .c_ospeed       = 9600,
 };
 
 /*
@@ -464,7 +466,7 @@ static int  stl_cd1400getreg(struct stlport *portp, int regnr);
 static int     stl_cd1400updatereg(struct stlport *portp, int regnr, int value);
 static int     stl_cd1400panelinit(struct stlbrd *brdp, struct stlpanel *panelp);
 static void    stl_cd1400portinit(struct stlbrd *brdp, struct stlpanel *panelp, struct stlport *portp);
-static void    stl_cd1400setport(struct stlport *portp, struct termios *tiosp);
+static void    stl_cd1400setport(struct stlport *portp, struct ktermios *tiosp);
 static int     stl_cd1400getsignals(struct stlport *portp);
 static void    stl_cd1400setsignals(struct stlport *portp, int dtr, int rts);
 static void    stl_cd1400ccrwait(struct stlport *portp);
@@ -493,7 +495,7 @@ static int  stl_sc26198updatereg(struct stlport *portp, int regnr, int value);
 static int     stl_sc26198getglobreg(struct stlport *portp, int regnr);
 static int     stl_sc26198panelinit(struct stlbrd *brdp, struct stlpanel *panelp);
 static void    stl_sc26198portinit(struct stlbrd *brdp, struct stlpanel *panelp, struct stlport *portp);
-static void    stl_sc26198setport(struct stlport *portp, struct termios *tiosp);
+static void    stl_sc26198setport(struct stlport *portp, struct ktermios *tiosp);
 static int     stl_sc26198getsignals(struct stlport *portp);
 static void    stl_sc26198setsignals(struct stlport *portp, int dtr, int rts);
 static void    stl_sc26198enablerxtx(struct stlport *portp, int rx, int tx);
@@ -521,7 +523,7 @@ static void stl_sc26198otherisr(struct stlport *port, unsigned int iack);
 typedef struct uart {
        int     (*panelinit)(struct stlbrd *brdp, struct stlpanel *panelp);
        void    (*portinit)(struct stlbrd *brdp, struct stlpanel *panelp, struct stlport *portp);
-       void    (*setport)(struct stlport *portp, struct termios *tiosp);
+       void    (*setport)(struct stlport *portp, struct ktermios *tiosp);
        int     (*getsignals)(struct stlport *portp);
        void    (*setsignals)(struct stlport *portp, int dtr, int rts);
        void    (*enablerxtx)(struct stlport *portp, int rx, int tx);
@@ -1427,10 +1429,10 @@ static void stl_start(struct tty_struct *tty)
 
 /*****************************************************************************/
 
-static void stl_settermios(struct tty_struct *tty, struct termios *old)
+static void stl_settermios(struct tty_struct *tty, struct ktermios *old)
 {
        struct stlport  *portp;
-       struct termios  *tiosp;
+       struct ktermios *tiosp;
 
        pr_debug("stl_settermios(tty=%p,old=%p)\n", tty, old);
 
@@ -2468,7 +2470,7 @@ static int __init stl_findpcibrds(void)
        pr_debug("stl_findpcibrds()\n");
 
        for (i = 0; (i < stl_nrpcibrds); i++)
-               while ((dev = pci_find_device(stl_pcibrds[i].vendid,
+               while ((dev = pci_get_device(stl_pcibrds[i].vendid,
                    stl_pcibrds[i].devid, dev))) {
 
 /*
@@ -2947,7 +2949,7 @@ static void stl_cd1400ccrwait(struct stlport *portp)
  *     settings.
  */
 
-static void stl_cd1400setport(struct stlport *portp, struct termios *tiosp)
+static void stl_cd1400setport(struct stlport *portp, struct ktermios *tiosp)
 {
        struct stlbrd   *brdp;
        unsigned long   flags;
@@ -3924,7 +3926,7 @@ static void stl_sc26198portinit(struct stlbrd *brdp, struct stlpanel *panelp, st
  *     settings.
  */
 
-static void stl_sc26198setport(struct stlport *portp, struct termios *tiosp)
+static void stl_sc26198setport(struct stlport *portp, struct ktermios *tiosp)
 {
        struct stlbrd   *brdp;
        unsigned long   flags;
index cc10af08cb059b7f587586518011613541bf028b..e9bc147c32fef5300fda1ca848f5fe6b3af0f2d6 100644 (file)
@@ -2263,6 +2263,8 @@ static int sx_init_drivers(void)
        sx_driver->init_termios = tty_std_termios;
        sx_driver->init_termios.c_cflag =
          B9600 | CS8 | CREAD | HUPCL | CLOCAL;
+       sx_driver->init_termios.c_ispeed = 9600;
+       sx_driver->init_termios.c_ospeed = 9600;
        sx_driver->flags = TTY_DRIVER_REAL_RAW;
        tty_set_operations(sx_driver, &sx_ops);
 
index 645187b9141e527d012c613e665e9f15ea5e9ecc..acc6fab601ccaa6f592052595a3587810607c522 100644 (file)
@@ -3060,7 +3060,7 @@ static int mgsl_ioctl_common(struct mgsl_struct *info, unsigned int cmd, unsigne
  *     
  * Return Value:               None
  */
-static void mgsl_set_termios(struct tty_struct *tty, struct termios *old_termios)
+static void mgsl_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
 {
        struct mgsl_struct *info = (struct mgsl_struct *)tty->driver_data;
        unsigned long flags;
@@ -4405,6 +4405,8 @@ static int mgsl_init_tty(void)
        serial_driver->init_termios = tty_std_termios;
        serial_driver->init_termios.c_cflag =
                B9600 | CS8 | CREAD | HUPCL | CLOCAL;
+       serial_driver->init_termios.c_ispeed = 9600;
+       serial_driver->init_termios.c_ospeed = 9600;
        serial_driver->flags = TTY_DRIVER_REAL_RAW;
        tty_set_operations(serial_driver, &mgsl_ops);
        if ((rc = tty_register_driver(serial_driver)) < 0) {
index e4730a7312b50d8e3ad4788c9207c294566ae51d..792c79c315e00292abc21e7febea957c171506c0 100644 (file)
@@ -151,7 +151,7 @@ static struct tty_driver *serial_driver;
 static int  open(struct tty_struct *tty, struct file * filp);
 static void close(struct tty_struct *tty, struct file * filp);
 static void hangup(struct tty_struct *tty);
-static void set_termios(struct tty_struct *tty, struct termios *old_termios);
+static void set_termios(struct tty_struct *tty, struct ktermios *old_termios);
 
 static int  write(struct tty_struct *tty, const unsigned char *buf, int count);
 static void put_char(struct tty_struct *tty, unsigned char ch);
@@ -816,7 +816,7 @@ static void hangup(struct tty_struct *tty)
        wake_up_interruptible(&info->open_wait);
 }
 
-static void set_termios(struct tty_struct *tty, struct termios *old_termios)
+static void set_termios(struct tty_struct *tty, struct ktermios *old_termios)
 {
        struct slgt_info *info = tty->driver_data;
        unsigned long flags;
@@ -3546,6 +3546,8 @@ static int __init slgt_init(void)
        serial_driver->init_termios = tty_std_termios;
        serial_driver->init_termios.c_cflag =
                B9600 | CS8 | CREAD | HUPCL | CLOCAL;
+       serial_driver->init_termios.c_ispeed = 9600;
+       serial_driver->init_termios.c_ospeed = 9600;
        serial_driver->flags = TTY_DRIVER_REAL_RAW;
        tty_set_operations(serial_driver, &ops);
        if ((rc = tty_register_driver(serial_driver)) < 0) {
index 20a96ef250bec9e3074544d43fac7889efdc5a95..53e8ccf94fe33be05e76f7d3f1b6c7a6b8a2f394 100644 (file)
@@ -519,7 +519,7 @@ static struct tty_driver *serial_driver;
 static int  open(struct tty_struct *tty, struct file * filp);
 static void close(struct tty_struct *tty, struct file * filp);
 static void hangup(struct tty_struct *tty);
-static void set_termios(struct tty_struct *tty, struct termios *old_termios);
+static void set_termios(struct tty_struct *tty, struct ktermios *old_termios);
 
 static int  write(struct tty_struct *tty, const unsigned char *buf, int count);
 static void put_char(struct tty_struct *tty, unsigned char ch);
@@ -918,7 +918,7 @@ static void hangup(struct tty_struct *tty)
 
 /* Set new termios settings
  */
-static void set_termios(struct tty_struct *tty, struct termios *old_termios)
+static void set_termios(struct tty_struct *tty, struct ktermios *old_termios)
 {
        SLMP_INFO *info = (SLMP_INFO *)tty->driver_data;
        unsigned long flags;
@@ -4034,6 +4034,8 @@ static int __init synclinkmp_init(void)
        serial_driver->init_termios = tty_std_termios;
        serial_driver->init_termios.c_cflag =
                B9600 | CS8 | CREAD | HUPCL | CLOCAL;
+       serial_driver->init_termios.c_ispeed = 9600;
+       serial_driver->init_termios.c_ospeed = 9600;
        serial_driver->flags = TTY_DRIVER_REAL_RAW;
        tty_set_operations(serial_driver, &ops);
        if ((rc = tty_register_driver(serial_driver)) < 0) {
index 0ffba4e911ca0279aaeab2d91c78ad20c0f57c5c..30486df9fd3f74d198b78aeb5c78c84f5d8e540c 100644 (file)
@@ -495,8 +495,8 @@ static int get_sgttyb(struct tty_struct * tty, struct sgttyb __user * sgttyb)
        struct sgttyb tmp;
 
        mutex_lock(&tty->termios_mutex);
-       tmp.sg_ispeed = tty->c_ispeed;
-       tmp.sg_ospeed = tty->c_ospeed;
+       tmp.sg_ispeed = tty->termios->c_ispeed;
+       tmp.sg_ospeed = tty->termios->c_ospeed;
        tmp.sg_erase = tty->termios->c_cc[VERASE];
        tmp.sg_kill = tty->termios->c_cc[VKILL];
        tmp.sg_flags = get_sgflags(tty);
index d0b94dd1af6da1253aeadf7c92d570d28c709982..e01317cb1a0e08d4799582f5d7ecbad49765ef22 100644 (file)
@@ -153,6 +153,8 @@ static int scc_init_drivers(void)
        scc_driver->init_termios = tty_std_termios;
        scc_driver->init_termios.c_cflag =
          B9600 | CS8 | CREAD | HUPCL | CLOCAL;
+       scc_driver->init_termios.c_ispeed = 9600;
+       scc_driver->init_termios.c_ospeed = 9600;
        scc_driver->flags = TTY_DRIVER_REAL_RAW;
        tty_set_operations(scc_driver, &scc_ops);
 
index 787a630a8e567fb520a62ab6b63c41a5d5b170df..0475a54df83a4612ef58d7ada853fc3f0e4ef500 100644 (file)
@@ -1203,7 +1203,7 @@ static int capinc_tty_ioctl(struct tty_struct *tty, struct file * file,
        return error;
 }
 
-static void capinc_tty_set_termios(struct tty_struct *tty, struct termios * old)
+static void capinc_tty_set_termios(struct tty_struct *tty, struct ktermios * old)
 {
 #ifdef _DEBUG_TTYFUNCS
        printk(KERN_DEBUG "capinc_tty_set_termios\n");
index 7edea015867e8c7cd1ccca220d3549372dc67977..458b6462f93779c489440ecce018ead677145d5c 100644 (file)
@@ -127,7 +127,7 @@ static int  if_write_room(struct tty_struct *tty);
 static int  if_chars_in_buffer(struct tty_struct *tty);
 static void if_throttle(struct tty_struct *tty);
 static void if_unthrottle(struct tty_struct *tty);
-static void if_set_termios(struct tty_struct *tty, struct termios *old);
+static void if_set_termios(struct tty_struct *tty, struct ktermios *old);
 static int  if_tiocmget(struct tty_struct *tty, struct file *file);
 static int  if_tiocmset(struct tty_struct *tty, struct file *file,
                        unsigned int set, unsigned int clear);
@@ -490,7 +490,7 @@ static void if_unthrottle(struct tty_struct *tty)
        mutex_unlock(&cs->mutex);
 }
 
-static void if_set_termios(struct tty_struct *tty, struct termios *old)
+static void if_set_termios(struct tty_struct *tty, struct ktermios *old)
 {
        struct cardstate *cs;
        unsigned int iflag;
index 2b91bb07fc7f2ab087b80d501f772deca3f426ca..fc80afe555b9e9063229dca25739aa5b33afe29a 100644 (file)
@@ -1464,7 +1464,7 @@ isdn_tty_ioctl(struct tty_struct *tty, struct file *file,
 }
 
 static void
-isdn_tty_set_termios(struct tty_struct *tty, struct termios *old_termios)
+isdn_tty_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
 {
        modem_info *info = (modem_info *) tty->driver_data;
 
index 6a98b7ae4975d9066e840707e8d095e183075b46..ad1857364d51c42ff3a23ce610fc8083ac059754 100644 (file)
@@ -117,7 +117,7 @@ static int irtty_change_speed(struct sir_dev *dev, unsigned speed)
 {
        struct sirtty_cb *priv = dev->priv;
        struct tty_struct *tty;
-        struct termios old_termios;
+        struct ktermios old_termios;
        int cflag;
 
        IRDA_ASSERT(priv != NULL, return -1;);
@@ -318,7 +318,7 @@ static void irtty_write_wakeup(struct tty_struct *tty)
 
 static inline void irtty_stop_receiver(struct tty_struct *tty, int stop)
 {
-       struct termios old_termios;
+       struct ktermios old_termios;
        int cflag;
 
        lock_kernel();
index 6f43e04dbefdce1e57eee86bfd94960a7488d89d..2d173e5c8a098514d5f23f136bbe775122bc920e 100644 (file)
@@ -60,8 +60,6 @@ static unsigned short int sclp_tty_chars_count;
 
 struct tty_driver *sclp_tty_driver;
 
-extern struct termios  tty_std_termios;
-
 static struct sclp_ioctls sclp_ioctls;
 static struct sclp_ioctls sclp_ioctls_init =
 {
index 4717c3611601f308094f588238a5b6c8c039cbd9..09844621edc0f5e9d2476fd019e57ffb2af42506 100644 (file)
@@ -1659,7 +1659,7 @@ tty3270_flush_buffer(struct tty_struct *tty)
  * Check for visible/invisible input switches
  */
 static void
-tty3270_set_termios(struct tty_struct *tty, struct termios *old)
+tty3270_set_termios(struct tty_struct *tty, struct ktermios *old)
 {
        struct tty3270 *tp;
        int new;
index 6a1a568ca6498b932c89c5eaeed32142885ebf02..facb6785561906dc0b738ed5ca35cbe55946f064 100644 (file)
@@ -214,8 +214,8 @@ static void serial21285_shutdown(struct uart_port *port)
 }
 
 static void
-serial21285_set_termios(struct uart_port *port, struct termios *termios,
-                       struct termios *old)
+serial21285_set_termios(struct uart_port *port, struct ktermios *termios,
+                       struct ktermios *old)
 {
        unsigned long flags;
        unsigned int baud, quot, h_lcr;
index 9b8b585513ec5aaeccf108f0d0a0498b174a7ea3..cad426c9711e970d0b7d62718bf894b7ca54536c 100644 (file)
@@ -1061,7 +1061,7 @@ static int rs_ioctl(struct tty_struct *tty, struct file * file,
        return 0;
 }
 
-static void rs_set_termios(struct tty_struct *tty, struct termios *old_termios)
+static void rs_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
 {
        struct m68k_serial *info = (struct m68k_serial *)tty->driver_data;
 
index 634ecca36a7737d19397ea9b32d2d6636a6fc65a..68817a7d8c0d46c7ea33e05e3a1eeac7013a7db8 100644 (file)
@@ -1523,7 +1523,7 @@ static int rs_360_ioctl(struct tty_struct *tty, struct file * file,
 
 /* FIX UP modem control here someday......
 */
-static void rs_360_set_termios(struct tty_struct *tty, struct termios *old_termios)
+static void rs_360_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
 {
        ser_info_t *info = (ser_info_t *)tty->driver_data;
 
index e34bd03cfce738c4d82ff34aae9718af1e53332d..51f3c739f7e1b87943734ae1fd746c72492891eb 100644 (file)
@@ -1763,8 +1763,8 @@ static unsigned int serial8250_get_divisor(struct uart_port *port, unsigned int
 }
 
 static void
-serial8250_set_termios(struct uart_port *port, struct termios *termios,
-                      struct termios *old)
+serial8250_set_termios(struct uart_port *port, struct ktermios *termios,
+                      struct ktermios *old)
 {
        struct uart_8250_port *up = (struct uart_8250_port *)port;
        unsigned char cval, fcr = 0;
index 4d3626ef46438c324a569dd980a6e6b85e51e481..61db6973755a4ee76eed9f27cac40ced59814c20 100644 (file)
@@ -345,8 +345,8 @@ static void pl010_shutdown(struct uart_port *port)
 }
 
 static void
-pl010_set_termios(struct uart_port *port, struct termios *termios,
-                    struct termios *old)
+pl010_set_termios(struct uart_port *port, struct ktermios *termios,
+                    struct ktermios *old)
 {
        unsigned int lcr_h, old_cr;
        unsigned long flags;
index d503625730df56dc4334868acba23a33d486e802..9a3b374b2a08d89399b91d75cd613351b83978bf 100644 (file)
@@ -412,8 +412,8 @@ static void pl011_shutdown(struct uart_port *port)
 }
 
 static void
-pl011_set_termios(struct uart_port *port, struct termios *termios,
-                    struct termios *old)
+pl011_set_termios(struct uart_port *port, struct ktermios *termios,
+                    struct ktermios *old)
 {
        unsigned int lcr_h, old_cr;
        unsigned long flags;
index 9217ee6c786576886039f819ebff397b01f99f2d..ed7f7209ea5926a8aa840b667884448f6c232ead 100644 (file)
@@ -478,7 +478,7 @@ static void atmel_serial_pm(struct uart_port *port, unsigned int state, unsigned
 /*
  * Change the port parameters
  */
-static void atmel_set_termios(struct uart_port *port, struct termios * termios, struct termios * old)
+static void atmel_set_termios(struct uart_port *port, struct ktermios * termios, struct ktermios * old)
 {
        unsigned long flags;
        unsigned int mode, imr, quot, baud;
index 598012714882751888ede1f3dda4f11941c94680..23827189ec0e7891645d36fac7e933be6acadadf 100644 (file)
@@ -286,8 +286,8 @@ static void clps711xuart_shutdown(struct uart_port *port)
 }
 
 static void
-clps711xuart_set_termios(struct uart_port *port, struct termios *termios,
-                        struct termios *old)
+clps711xuart_set_termios(struct uart_port *port, struct ktermios *termios,
+                        struct ktermios *old)
 {
        unsigned int ubrlcr, baud, quot;
        unsigned long flags;
index 7a24e53546c71501c4017cf231a6615ce57ab8c2..42b050c46abed3c17572b1865e5ba9c2a3432dde 100644 (file)
@@ -804,8 +804,8 @@ static struct e100_serial rs_table[] = {
 
 #define NR_PORTS (sizeof(rs_table)/sizeof(struct e100_serial))
 
-static struct termios *serial_termios[NR_PORTS];
-static struct termios *serial_termios_locked[NR_PORTS];
+static struct ktermios *serial_termios[NR_PORTS];
+static struct ktermios *serial_termios_locked[NR_PORTS];
 #ifdef CONFIG_ETRAX_SERIAL_FAST_TIMER
 static struct fast_timer fast_timers[NR_PORTS];
 #endif
@@ -4223,7 +4223,7 @@ rs_ioctl(struct tty_struct *tty, struct file * file,
 }
 
 static void
-rs_set_termios(struct tty_struct *tty, struct termios *old_termios)
+rs_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
 {
        struct e100_serial *info = (struct e100_serial *)tty->driver_data;
 
@@ -4877,6 +4877,8 @@ rs_init(void)
        driver->init_termios = tty_std_termios;
        driver->init_termios.c_cflag =
                B115200 | CS8 | CREAD | HUPCL | CLOCAL; /* is normally B9600 default... */
+       driver->init_termios.c_ispeed = 115200;
+       driver->init_termios.c_ospeed = 115200;
        driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV;
        driver->termios = serial_termios;
        driver->termios_locked = serial_termios_locked;
index f30b93d6ef79ff85e7a0318eba71880d3c6a6686..4a23340663aaaa10448d80a9865b8052057653bf 100644 (file)
@@ -93,8 +93,8 @@ struct e100_serial {
 
        struct work_struct      work;
        struct async_icount     icount;   /* error-statistics etc.*/
-       struct termios          normal_termios;
-       struct termios          callout_termios;
+       struct ktermios         normal_termios;
+       struct ktermios         callout_termios;
 #ifdef DECLARE_WAITQUEUE
        wait_queue_head_t       open_wait;
        wait_queue_head_t       close_wait;
index af1544f3356f7656376a01786436fde357f74c99..587d87b9eb3cebede48fa55362b56ccd8339e16d 100644 (file)
@@ -461,8 +461,8 @@ static void dz_break_ctl(struct uart_port *uport, int break_state)
        spin_unlock_irqrestore(&uport->lock, flags);
 }
 
-static void dz_set_termios(struct uart_port *uport, struct termios *termios,
-                          struct termios *old_termios)
+static void dz_set_termios(struct uart_port *uport, struct ktermios *termios,
+                          struct ktermios *old_termios)
 {
        struct dz_port *dport = (struct dz_port *)uport;
        unsigned long flags;
index 8aa0f641866b3622338b21542e9638ce3a101e26..7d623003e65ed841f4f3d2e1c00559884919be04 100644 (file)
@@ -1087,8 +1087,8 @@ static void icom_close(struct uart_port *port)
 }
 
 static void icom_set_termios(struct uart_port *port,
-                            struct termios *termios,
-                            struct termios *old_termios)
+                            struct ktermios *termios,
+                            struct ktermios *old_termios)
 {
        int baud;
        unsigned cflag, iflag;
index ee5c782597dd82cac10689462f3322779ff5f29d..e216dcf29376582776418cf2ccfb825885a91124 100644 (file)
@@ -459,8 +459,8 @@ static void imx_shutdown(struct uart_port *port)
 }
 
 static void
-imx_set_termios(struct uart_port *port, struct termios *termios,
-                  struct termios *old)
+imx_set_termios(struct uart_port *port, struct ktermios *termios,
+                  struct ktermios *old)
 {
        struct imx_port *sport = (struct imx_port *)port;
        unsigned long flags;
index 2308d26c862987a24c1a055cbcb27af325216036..9cc0be932316e86545de429622e9ebbe5f837215 100644 (file)
@@ -950,7 +950,7 @@ static void transmit_chars(struct uart_port *the_port)
  */
 static void
 ioc3_change_speed(struct uart_port *the_port,
-                 struct termios *new_termios, struct termios *old_termios)
+                 struct ktermios *new_termios, struct ktermios *old_termios)
 {
        struct ioc3_port *port = get_ioc3_port(the_port);
        unsigned int cflag;
@@ -1853,7 +1853,7 @@ static int ic3_startup(struct uart_port *the_port)
  */
 static void
 ic3_set_termios(struct uart_port *the_port,
-               struct termios *termios, struct termios *old_termios)
+               struct ktermios *termios, struct ktermios *old_termios)
 {
        unsigned long port_flags;
 
index 711bd151143913c0f48a836701f196dbc96eeb79..c862f67c985af312b15f11d68cb29390688bfacb 100644 (file)
@@ -1681,7 +1681,7 @@ static void transmit_chars(struct uart_port *the_port)
  */
 static void
 ioc4_change_speed(struct uart_port *the_port,
-                 struct termios *new_termios, struct termios *old_termios)
+                 struct ktermios *new_termios, struct ktermios *old_termios)
 {
        struct ioc4_port *port = get_ioc4_port(the_port, 0);
        int baud, bits;
@@ -1802,7 +1802,7 @@ static inline int ic4_startup_local(struct uart_port *the_port)
        ioc4_set_proto(port, the_port->mapbase);
 
        /* set the speed of the serial port */
-       ioc4_change_speed(the_port, info->tty->termios, (struct termios *)0);
+       ioc4_change_speed(the_port, info->tty->termios, (struct ktermios *)0);
 
        return 0;
 }
@@ -2570,7 +2570,7 @@ static int ic4_startup(struct uart_port *the_port)
  */
 static void
 ic4_set_termios(struct uart_port *the_port,
-               struct termios *termios, struct termios *old_termios)
+               struct ktermios *termios, struct ktermios *old_termios)
 {
        unsigned long port_flags;
 
index dca6c1bde8f9f5180ce28c08293b6e3da4103fdd..0746c9446ae018c13273505fc5abbd5b1dc6a852 100644 (file)
@@ -840,8 +840,8 @@ ip22zilog_convert_to_zs(struct uart_ip22zilog_port *up, unsigned int cflag,
 
 /* The port lock is not held.  */
 static void
-ip22zilog_set_termios(struct uart_port *port, struct termios *termios,
-                     struct termios *old)
+ip22zilog_set_termios(struct uart_port *port, struct ktermios *termios,
+                     struct ktermios *old)
 {
        struct uart_ip22zilog_port *up = (struct uart_ip22zilog_port *) port;
        unsigned long flags;
index f8262e6ad8d3c3fc9728e621248c2d54f70bf2e5..7cf1c60027f842022a72e3f6dfed1c9ee35ea6d1 100644 (file)
@@ -142,7 +142,7 @@ static void jsm_tty_send_xchar(struct uart_port *port, char ch)
 {
        unsigned long lock_flags;
        struct jsm_channel *channel = (struct jsm_channel *)port;
-       struct termios *termios;
+       struct ktermios *termios;
 
        spin_lock_irqsave(&port->lock, lock_flags);
        termios = port->info->tty->termios;
@@ -180,7 +180,7 @@ static int jsm_tty_open(struct uart_port *port)
        struct jsm_board *brd;
        int rc = 0;
        struct jsm_channel *channel = (struct jsm_channel *)port;
-       struct termios *termios;
+       struct ktermios *termios;
 
        /* Get board pointer from our array of majors we have allocated */
        brd = channel->ch_bd;
@@ -269,7 +269,7 @@ static int jsm_tty_open(struct uart_port *port)
 static void jsm_tty_close(struct uart_port *port)
 {
        struct jsm_board *bd;
-       struct termios *ts;
+       struct ktermios *ts;
        struct jsm_channel *channel = (struct jsm_channel *)port;
 
        jsm_printk(CLOSE, INFO, &channel->ch_bd->pci_dev, "start\n");
@@ -302,8 +302,8 @@ static void jsm_tty_close(struct uart_port *port)
 }
 
 static void jsm_tty_set_termios(struct uart_port *port,
-                                struct termios *termios,
-                                struct termios *old_termios)
+                                struct ktermios *termios,
+                                struct ktermios *old_termios)
 {
        unsigned long lock_flags;
        struct jsm_channel *channel = (struct jsm_channel *)port;
index 7656a35f5e2f34fe06b3c0d6898e9e99d555de6f..6e09c8b395e8d4a5541f14223511904d76d9919e 100644 (file)
@@ -699,7 +699,7 @@ static unsigned int m32r_sio_get_divisor(struct uart_port *port,
 }
 
 static void m32r_sio_set_termios(struct uart_port *port,
-       struct termios *termios, struct termios *old)
+       struct ktermios *termios, struct ktermios *old)
 {
        struct uart_sio_port *up = (struct uart_sio_port *)port;
        unsigned char cval = 0;
index 3db206d29b338b36df60bd6920872fcdb6d4702b..08430961a89513885688a5197dadbfa24361d79c 100644 (file)
@@ -1132,7 +1132,7 @@ static int mcfrs_ioctl(struct tty_struct *tty, struct file * file,
        return 0;
 }
 
-static void mcfrs_set_termios(struct tty_struct *tty, struct termios *old_termios)
+static void mcfrs_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
 {
        struct mcf_serial *info = (struct mcf_serial *)tty->driver_data;
 
index 6dd579ed977782d66e26465806afe5ee97f9701d..9d11a75663e668462ca871851ac647529d9d8ad2 100644 (file)
@@ -270,8 +270,8 @@ mpc52xx_uart_shutdown(struct uart_port *port)
 }
 
 static void
-mpc52xx_uart_set_termios(struct uart_port *port, struct termios *new,
-                         struct termios *old)
+mpc52xx_uart_set_termios(struct uart_port *port, struct ktermios *new,
+                         struct ktermios *old)
 {
        struct mpc52xx_psc __iomem *psc = PSC(port);
        unsigned long flags;
index 29823bd60fb0f69a60dd6deaaff4249c6fcadb60..3d2fcc57b1ced216ec9d6702f5c10a73edd8631f 100644 (file)
@@ -1440,8 +1440,8 @@ mpsc_shutdown(struct uart_port *port)
 }
 
 static void
-mpsc_set_termios(struct uart_port *port, struct termios *termios,
-                struct termios *old)
+mpsc_set_termios(struct uart_port *port, struct ktermios *termios,
+                struct ktermios *old)
 {
        struct mpsc_port_info *pi = (struct mpsc_port_info *)port;
        u32 baud;
index 8ad1b8c5ec5d2427eaeef6baefe217874a1eb6d6..ccb8fa1800a58e0b8a9f1fdf1b32b40d1e225831 100644 (file)
@@ -273,8 +273,8 @@ static void mux_shutdown(struct uart_port *port)
  * The Serial Mux does not support this function.
  */
 static void
-mux_set_termios(struct uart_port *port, struct termios *termios,
-               struct termios *old)
+mux_set_termios(struct uart_port *port, struct ktermios *termios,
+               struct ktermios *old)
 {
 }
 
index 062bad457b1a6775c5566e6a311a2e09798cb642..b56f7db4503100097471c7e037e76a2a967d1349 100644 (file)
@@ -337,8 +337,8 @@ static void netx_shutdown(struct uart_port *port)
 }
 
 static void
-netx_set_termios(struct uart_port *port, struct termios *termios,
-                  struct termios *old)
+netx_set_termios(struct uart_port *port, struct ktermios *termios,
+                  struct ktermios *old)
 {
        unsigned int baud, quot;
        unsigned char old_cr;
index bf9809ed9c0ba72177887be032914008cc5ca490..752ef07516b9d7d6cfa6ec2842334b0a790ab20a 100644 (file)
@@ -1262,8 +1262,8 @@ static void pmz_irda_setup(struct uart_pmac_port *uap, unsigned long *baud)
 }
 
 
-static void __pmz_set_termios(struct uart_port *port, struct termios *termios,
-                             struct termios *old)
+static void __pmz_set_termios(struct uart_port *port, struct ktermios *termios,
+                             struct ktermios *old)
 {
        struct uart_pmac_port *uap = to_pmz(port);
        unsigned long baud;
@@ -1273,7 +1273,7 @@ static void __pmz_set_termios(struct uart_port *port, struct termios *termios,
        if (ZS_IS_ASLEEP(uap))
                return;
 
-       memcpy(&uap->termios_cache, termios, sizeof(struct termios));
+       memcpy(&uap->termios_cache, termios, sizeof(struct ktermios));
 
        /* XXX Check which revs of machines actually allow 1 and 4Mb speeds
         * on the IR dongle. Note that the IRTTY driver currently doesn't know
@@ -1313,8 +1313,8 @@ static void __pmz_set_termios(struct uart_port *port, struct termios *termios,
 }
 
 /* The port lock is not held.  */
-static void pmz_set_termios(struct uart_port *port, struct termios *termios,
-                           struct termios *old)
+static void pmz_set_termios(struct uart_port *port, struct ktermios *termios,
+                           struct ktermios *old)
 {
        struct uart_pmac_port *uap = to_pmz(port);
        unsigned long flags;
index c03f9bfacdd897022d1d3d20f065830447e44975..570b0d925e83037d39d3b367c444bf9a5476792e 100644 (file)
@@ -60,7 +60,7 @@ struct uart_pmac_port {
        volatile struct dbdma_regs      __iomem *tx_dma_regs;
        volatile struct dbdma_regs      __iomem *rx_dma_regs;
 
-       struct termios                  termios_cache;
+       struct ktermios                 termios_cache;
 };
 
 #define to_pmz(p) ((struct uart_pmac_port *)(p))
index 415fe9633a9b7ce81cddade5929a71b72fd12370..d403aaa55092460e41f439d6404fc4fe34ac257f 100644 (file)
@@ -433,8 +433,8 @@ static void serial_pxa_shutdown(struct uart_port *port)
 }
 
 static void
-serial_pxa_set_termios(struct uart_port *port, struct termios *termios,
-                      struct termios *old)
+serial_pxa_set_termios(struct uart_port *port, struct ktermios *termios,
+                      struct ktermios *old)
 {
        struct uart_pxa_port *up = (struct uart_pxa_port *)port;
        unsigned char cval, fcr = 0;
index 8dfc2dd058ca4ba74aee7f2467f890c04698c006..3ba9208ebd0c87de5c610a683b29cf2733a15a80 100644 (file)
@@ -738,8 +738,8 @@ static unsigned int s3c24xx_serial_getclk(struct uart_port *port,
 }
 
 static void s3c24xx_serial_set_termios(struct uart_port *port,
-                                      struct termios *termios,
-                                      struct termios *old)
+                                      struct ktermios *termios,
+                                      struct ktermios *old)
 {
        struct s3c2410_uartcfg *cfg = s3c24xx_port_to_cfg(port);
        struct s3c24xx_uart_port *ourport = to_ourport(port);
index d4065266b6fcf9af83e7714aa8da9eb74b50d221..58a83c27e14b44e5dc11574a3f893f62121a478c 100644 (file)
@@ -408,8 +408,8 @@ static void sa1100_shutdown(struct uart_port *port)
 }
 
 static void
-sa1100_set_termios(struct uart_port *port, struct termios *termios,
-                  struct termios *old)
+sa1100_set_termios(struct uart_port *port, struct ktermios *termios,
+                  struct ktermios *old)
 {
        struct sa1100_port *sport = (struct sa1100_port *)port;
        unsigned long flags;
index c67b05e9a45144c3410c23ed0050f4f70ec26c9a..f84982e508c7efc7e2eb6bcdca37f95ee22e8b67 100644 (file)
@@ -65,7 +65,7 @@ static struct lock_class_key port_lock_key;
 #define uart_console(port)     (0)
 #endif
 
-static void uart_change_speed(struct uart_state *state, struct termios *old_termios);
+static void uart_change_speed(struct uart_state *state, struct ktermios *old_termios);
 static void uart_wait_until_sent(struct tty_struct *tty, int timeout);
 static void uart_change_pm(struct uart_state *state, int pm_state);
 
@@ -338,8 +338,8 @@ EXPORT_SYMBOL(uart_update_timeout);
  *     we're actually going to be using.
  */
 unsigned int
-uart_get_baud_rate(struct uart_port *port, struct termios *termios,
-                  struct termios *old, unsigned int min, unsigned int max)
+uart_get_baud_rate(struct uart_port *port, struct ktermios *termios,
+                  struct ktermios *old, unsigned int min, unsigned int max)
 {
        unsigned int try, baud, altbaud = 38400;
        upf_t flags = port->flags & UPF_SPD_MASK;
@@ -421,11 +421,11 @@ uart_get_divisor(struct uart_port *port, unsigned int baud)
 EXPORT_SYMBOL(uart_get_divisor);
 
 static void
-uart_change_speed(struct uart_state *state, struct termios *old_termios)
+uart_change_speed(struct uart_state *state, struct ktermios *old_termios)
 {
        struct tty_struct *tty = state->info->tty;
        struct uart_port *port = state->port;
-       struct termios *termios;
+       struct ktermios *termios;
 
        /*
         * If we have no tty, termios, or the port does not exist,
@@ -1139,7 +1139,7 @@ uart_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd,
        return ret;
 }
 
-static void uart_set_termios(struct tty_struct *tty, struct termios *old_termios)
+static void uart_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
 {
        struct uart_state *state = tty->driver_data;
        unsigned long flags;
@@ -1866,7 +1866,7 @@ int __init
 uart_set_options(struct uart_port *port, struct console *co,
                 int baud, int parity, int bits, int flow)
 {
-       struct termios termios;
+       struct ktermios termios;
        int i;
 
        /*
@@ -1876,7 +1876,7 @@ uart_set_options(struct uart_port *port, struct console *co,
        spin_lock_init(&port->lock);
        lockdep_set_class(&port->lock, &port_lock_key);
 
-       memset(&termios, 0, sizeof(struct termios));
+       memset(&termios, 0, sizeof(struct ktermios));
 
        termios.c_cflag = CREAD | HUPCL | CLOCAL;
 
@@ -1991,12 +1991,12 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *port)
         * Re-enable the console device after suspending.
         */
        if (uart_console(port)) {
-               struct termios termios;
+               struct ktermios termios;
 
                /*
                 * First try to use the console cflag setting.
                 */
-               memset(&termios, 0, sizeof(struct termios));
+               memset(&termios, 0, sizeof(struct ktermios));
                termios.c_cflag = port->cons->cflag;
 
                /*
@@ -2189,6 +2189,7 @@ int uart_register_driver(struct uart_driver *drv)
        normal->subtype         = SERIAL_TYPE_NORMAL;
        normal->init_termios    = tty_std_termios;
        normal->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
+       normal->init_termios.c_ispeed = normal->init_termios.c_ospeed = 9600;
        normal->flags           = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV;
        normal->driver_state    = drv;
        tty_set_operations(normal, &uart_ops);
index 5e1ac356bbb07b7630bb5453a850fb25daf047ce..eb18d429752d2d40458eb47234f3fd4649bf39fd 100644 (file)
@@ -348,8 +348,8 @@ static void lh7a40xuart_shutdown (struct uart_port* port)
 }
 
 static void lh7a40xuart_set_termios (struct uart_port* port,
-                                    struct termios* termios,
-                                    struct termios* old)
+                                    struct ktermios* termios,
+                                    struct ktermios* old)
 {
        unsigned int con;
        unsigned int inten;
index 2a48289ac72277b6f516b16635595400009dbd17..7186a82c47595582dfe3de1dbac4b6bb283585ba 100644 (file)
@@ -556,8 +556,8 @@ static void serial_txx9_shutdown(struct uart_port *port)
 }
 
 static void
-serial_txx9_set_termios(struct uart_port *port, struct termios *termios,
-                      struct termios *old)
+serial_txx9_set_termios(struct uart_port *port, struct ktermios *termios,
+                      struct ktermios *old)
 {
        struct uart_txx9_port *up = (struct uart_txx9_port *)port;
        unsigned int cval, fcr = 0;
index 3b5f19ec21263420256345eec45ae32f39f1adcd..9031b57f12ddd754e93db42015d69e47ffabade4 100644 (file)
@@ -943,8 +943,8 @@ static void sci_shutdown(struct uart_port *port)
                s->disable(port);
 }
 
-static void sci_set_termios(struct uart_port *port, struct termios *termios,
-                           struct termios *old)
+static void sci_set_termios(struct uart_port *port, struct ktermios *termios,
+                           struct ktermios *old)
 {
        struct sci_port *s = &sci_ports[port->line];
        unsigned int status, baud, smr_val;
index 956b2cf08e1e09f39d90f0a4d12df15b93817979..253ceb895ca7bcf9a10b77b50e0493044aa30a32 100644 (file)
@@ -361,8 +361,8 @@ static int snp_startup(struct uart_port *port)
  *
  */
 static void
-snp_set_termios(struct uart_port *port, struct termios *termios,
-               struct termios *old)
+snp_set_termios(struct uart_port *port, struct ktermios *termios,
+               struct ktermios *old)
 {
 }
 
index 03941d27d15dcdb2d8338e47b63d852bf73e2fb0..40d48566215c07a9c3523a864e0be027872e962f 100644 (file)
@@ -281,8 +281,8 @@ static void sunhv_shutdown(struct uart_port *port)
 }
 
 /* port->lock is not held.  */
-static void sunhv_set_termios(struct uart_port *port, struct termios *termios,
-                             struct termios *old)
+static void sunhv_set_termios(struct uart_port *port, struct ktermios *termios,
+                             struct ktermios *old)
 {
        unsigned int baud = uart_get_baud_rate(port, termios, old, 0, 4000000);
        unsigned int quot = uart_get_divisor(port, baud);
index 08a7cd6a3a0c77a6a11497bd73be4141b33bfd0c..493d5bbb661be7daacc3e3f11aca47c32932811f 100644 (file)
@@ -786,8 +786,8 @@ static void sunsab_convert_to_sab(struct uart_sunsab_port *up, unsigned int cfla
 }
 
 /* port->lock is not held.  */
-static void sunsab_set_termios(struct uart_port *port, struct termios *termios,
-                              struct termios *old)
+static void sunsab_set_termios(struct uart_port *port, struct ktermios *termios,
+                              struct ktermios *old)
 {
        struct uart_sunsab_port *up = (struct uart_sunsab_port *) port;
        unsigned long flags;
index c577faea60e8ae7437a77e3f36b668805af174b4..564592b2b2ba26c32d10f49a34a799554295029d 100644 (file)
@@ -893,8 +893,8 @@ sunsu_change_speed(struct uart_port *port, unsigned int cflag,
 }
 
 static void
-sunsu_set_termios(struct uart_port *port, struct termios *termios,
-                 struct termios *old)
+sunsu_set_termios(struct uart_port *port, struct ktermios *termios,
+                 struct ktermios *old)
 {
        unsigned int baud, quot;
 
index b2cc703b2b9e976e6fc74d0f9f652a7960612c4e..75de919a9471f066c9766c61463594cc5f4d5e62 100644 (file)
@@ -922,8 +922,8 @@ sunzilog_convert_to_zs(struct uart_sunzilog_port *up, unsigned int cflag,
 
 /* The port lock is not held.  */
 static void
-sunzilog_set_termios(struct uart_port *port, struct termios *termios,
-                    struct termios *old)
+sunzilog_set_termios(struct uart_port *port, struct ktermios *termios,
+                    struct ktermios *old)
 {
        struct uart_sunzilog_port *up = (struct uart_sunzilog_port *) port;
        unsigned long flags;
index 83690653b78b2be5544bb701498534bdeefde56f..92eba893559d003189e680bdf7d17f2990300111 100644 (file)
@@ -214,8 +214,8 @@ static void ulite_shutdown(struct uart_port *port)
        free_irq(port->irq, port);
 }
 
-static void ulite_set_termios(struct uart_port *port, struct termios *termios,
-                             struct termios *old)
+static void ulite_set_termios(struct uart_port *port, struct ktermios *termios,
+                             struct ktermios *old)
 {
        unsigned long flags;
        unsigned int baud;
index 28f3bbff87bf48f1c5bbc16b8cc4affc26429b65..dd98aca6ed08114389c9b6a87ad5de07445a4a6b 100644 (file)
@@ -404,8 +404,8 @@ static void v850e_uart_shutdown (struct uart_port *port)
 }
 
 static void
-v850e_uart_set_termios (struct uart_port *port, struct termios *termios,
-                       struct termios *old)
+v850e_uart_set_termios (struct uart_port *port, struct ktermios *termios,
+                       struct ktermios *old)
 {
        unsigned cflags = termios->c_cflag;
 
index fd51f8182dec1f20f3a4d43d6c66361d5485b5e0..cf0e663b42ed97781c353f98cd8abb779b592a3c 100644 (file)
@@ -562,8 +562,8 @@ static void siu_shutdown(struct uart_port *port)
        free_irq(port->irq, port);
 }
 
-static void siu_set_termios(struct uart_port *port, struct termios *new,
-                            struct termios *old)
+static void siu_set_termios(struct uart_port *port, struct ktermios *new,
+                            struct ktermios *old)
 {
        tcflag_t c_cflag, c_iflag;
        uint8_t lcr, fcr, ier;
index 792becdfe6f844737b06ccc6dca776b4934b3e4c..fc3197273663e93c48f975cded7c748727ad0370 100644 (file)
@@ -1238,7 +1238,7 @@ static int rs_ioctl(struct tty_struct *tty, struct file * file,
        return 0;
 }
 
-static void rs_set_termios(struct tty_struct *tty, struct termios *old_termios)
+static void rs_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
 {
        struct dec_serial *info = (struct dec_serial *)tty->driver_data;
        int was_stopped;
index 7f1fa956dcdb6b0c558f8bb9a835a07222f22867..98199628e394e66df0e3c1c7a42e0874d420d3c4 100644 (file)
@@ -677,10 +677,10 @@ static const __u8 acm_tty_size[] = {
        5, 6, 7, 8
 };
 
-static void acm_tty_set_termios(struct tty_struct *tty, struct termios *termios_old)
+static void acm_tty_set_termios(struct tty_struct *tty, struct ktermios *termios_old)
 {
        struct acm *acm = tty->driver_data;
-       struct termios *termios = tty->termios;
+       struct ktermios *termios = tty->termios;
        struct usb_cdc_line_coding newline;
        int newctrl = acm->ctrlout;
 
index 208e55a667ac0d2124ece6bb49c17dbe1cf59d27..5516c59ed5ec28d6ea1dc864fd8a9ebd504bdd56 100644 (file)
@@ -200,7 +200,7 @@ static void gs_unthrottle(struct tty_struct * tty);
 static void gs_break(struct tty_struct *tty, int break_state);
 static int  gs_ioctl(struct tty_struct *tty, struct file *file,
        unsigned int cmd, unsigned long arg);
-static void gs_set_termios(struct tty_struct *tty, struct termios *old);
+static void gs_set_termios(struct tty_struct *tty, struct ktermios *old);
 
 static int gs_send(struct gs_dev *dev);
 static int gs_send_packet(struct gs_dev *dev, char *packet,
@@ -1077,7 +1077,7 @@ static int gs_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd,
 /*
  * gs_set_termios
  */
-static void gs_set_termios(struct tty_struct *tty, struct termios *old)
+static void gs_set_termios(struct tty_struct *tty, struct ktermios *old)
 {
 }
 
index 863966c1c5ac3befc71c296cc7a25b9255516bb7..5261cd22ee6bf635e6f8b44fc5cd7acd99ddb275 100644 (file)
@@ -156,7 +156,7 @@ cleanup:
 }
 
 static void ark3116_set_termios(struct usb_serial_port *port,
-                               struct termios *old_termios)
+                               struct ktermios *old_termios)
 {
        struct usb_serial *serial = port->serial;
        struct ark3116_private *priv = usb_get_serial_port_data(port);
@@ -326,7 +326,7 @@ static void ark3116_set_termios(struct usb_serial_port *port,
 
 static int ark3116_open(struct usb_serial_port *port, struct file *filp)
 {
-       struct termios tmp_termios;
+       struct ktermios tmp_termios;
        struct usb_serial *serial = port->serial;
        char *buf;
        int result = 0;
index 8835bb58ca9bfa5ec7d9a873dba1972275ad34ac..38b4dae319eedc3e8c0a30e1cc2243404ccd1b79 100644 (file)
@@ -92,7 +92,7 @@ static void belkin_sa_shutdown                (struct usb_serial *serial);
 static int  belkin_sa_open             (struct usb_serial_port *port, struct file *filp);
 static void belkin_sa_close            (struct usb_serial_port *port, struct file *filp);
 static void belkin_sa_read_int_callback (struct urb *urb);
-static void belkin_sa_set_termios      (struct usb_serial_port *port, struct termios * old);
+static void belkin_sa_set_termios      (struct usb_serial_port *port, struct ktermios * old);
 static int  belkin_sa_ioctl            (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg);
 static void belkin_sa_break_ctl                (struct usb_serial_port *port, int break_state );
 static int  belkin_sa_tiocmget         (struct usb_serial_port *port, struct file *file);
@@ -333,7 +333,7 @@ exit:
                     __FUNCTION__, retval);
 }
 
-static void belkin_sa_set_termios (struct usb_serial_port *port, struct termios *old_termios)
+static void belkin_sa_set_termios (struct usb_serial_port *port, struct ktermios *old_termios)
 {
        struct usb_serial *serial = port->serial;
        struct belkin_sa_private *priv = usb_get_serial_port_data(port);
index 7167728d764ce8033d1f3f1f3e2687b4930bfdcf..9386e216d68155caec8c9467ddfe4dd005c61859 100644 (file)
@@ -65,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__);
 
index f95d42c0d16a9c46e7d5f01e58f7f27716790f8e..2f9b7ac326633a6d6835164d52c7a9c00648e7a2 100644 (file)
@@ -41,7 +41,7 @@ static int cp2101_open(struct usb_serial_port*, struct file*);
 static void cp2101_cleanup(struct usb_serial_port*);
 static void cp2101_close(struct usb_serial_port*, struct file*);
 static void cp2101_get_termios(struct usb_serial_port*);
-static void cp2101_set_termios(struct usb_serial_port*, struct termios*);
+static void cp2101_set_termios(struct usb_serial_port*, struct ktermios*);
 static int cp2101_tiocmget (struct usb_serial_port *, struct file *);
 static int cp2101_tiocmset (struct usb_serial_port *, struct file *,
                unsigned int, unsigned int);
@@ -506,7 +506,7 @@ static void cp2101_get_termios (struct usb_serial_port *port)
 }
 
 static void cp2101_set_termios (struct usb_serial_port *port,
-               struct termios *old_termios)
+               struct ktermios *old_termios)
 {
        unsigned int cflag, old_cflag=0;
        int baud=0, bits;
index 093f303b3189d2a515a467e8c32598a5626aceca..a1fdb85b8c0ae91225c447f5cb79b6c19792e991 100644 (file)
@@ -143,7 +143,7 @@ struct cypress_private {
        wait_queue_head_t delta_msr_wait;  /* used for TIOCMIWAIT */
        char prev_status, diff_status;     /* used for TIOCMIWAIT */
        /* we pass a pointer to this as the arguement sent to cypress_set_termios old_termios */
-       struct termios tmp_termios;        /* stores the old termios settings */
+       struct ktermios tmp_termios;       /* stores the old termios settings */
 };
 
 /* write buffer structure */
@@ -165,7 +165,7 @@ static int  cypress_write           (struct usb_serial_port *port, const unsigned char *b
 static void cypress_send               (struct usb_serial_port *port);
 static int  cypress_write_room         (struct usb_serial_port *port);
 static int  cypress_ioctl              (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg);
-static void cypress_set_termios                (struct usb_serial_port *port, struct termios * old);
+static void cypress_set_termios                (struct usb_serial_port *port, struct ktermios * old);
 static int  cypress_tiocmget           (struct usb_serial_port *port, struct file *file);
 static int  cypress_tiocmset           (struct usb_serial_port *port, struct file *file, unsigned int set, unsigned int clear);
 static int  cypress_chars_in_buffer    (struct usb_serial_port *port);
@@ -949,13 +949,13 @@ static int cypress_ioctl (struct usb_serial_port *port, struct file * file, unsi
 
        switch (cmd) {
                case TIOCGSERIAL:
-                       if (copy_to_user((void __user *)arg, port->tty->termios, sizeof(struct termios))) {
+                       if (copy_to_user((void __user *)arg, port->tty->termios, sizeof(struct ktermios))) {
                                return -EFAULT;
                        }
                        return (0);
                        break;
                case TIOCSSERIAL:
-                       if (copy_from_user(port->tty->termios, (void __user *)arg, sizeof(struct termios))) {
+                       if (copy_from_user(port->tty->termios, (void __user *)arg, sizeof(struct ktermios))) {
                                return -EFAULT;
                        }
                        /* here we need to call cypress_set_termios to invoke the new settings */
@@ -1019,7 +1019,7 @@ static int cypress_ioctl (struct usb_serial_port *port, struct file * file, unsi
 
 
 static void cypress_set_termios (struct usb_serial_port *port,
-               struct termios *old_termios)
+               struct ktermios *old_termios)
 {
        struct cypress_private *priv = usb_get_serial_port_data(port);
        struct tty_struct *tty;
index 83d0e21145b01cf9b1b46352eae664b51799a164..9d9ea874639ce047bc3ac855d4b94abd020fa254 100644 (file)
@@ -449,7 +449,7 @@ static int digi_transmit_idle( struct usb_serial_port *port,
 static void digi_rx_throttle (struct usb_serial_port *port);
 static void digi_rx_unthrottle (struct usb_serial_port *port);
 static void digi_set_termios( struct usb_serial_port *port, 
-       struct termios *old_termios );
+       struct ktermios *old_termios );
 static void digi_break_ctl( struct usb_serial_port *port, int break_state );
 static int digi_ioctl( struct usb_serial_port *port, struct file *file,
        unsigned int cmd, unsigned long arg );
@@ -976,7 +976,7 @@ dbg( "digi_rx_unthrottle: TOP: port=%d", priv->dp_port_num );
 
 
 static void digi_set_termios( struct usb_serial_port *port, 
-       struct termios *old_termios )
+       struct ktermios *old_termios )
 {
 
        struct digi_port *priv = usb_get_serial_port_data(port);
@@ -1463,7 +1463,7 @@ static int digi_open( struct usb_serial_port *port, struct file *filp )
        int ret;
        unsigned char buf[32];
        struct digi_port *priv = usb_get_serial_port_data(port);
-       struct termios not_termios;
+       struct ktermios not_termios;
        unsigned long flags = 0;
 
 
index 4ce10a8319539f56187034ecfa611c4b7b663a05..92beeb19795f15ae325b3599771832c7f851b759 100644 (file)
@@ -92,7 +92,7 @@ static int  empeg_ioctl                       (struct usb_serial_port *port,
                                        struct file * file,
                                        unsigned int cmd,
                                        unsigned long arg);
-static void empeg_set_termios          (struct usb_serial_port *port, struct termios *old_termios);
+static void empeg_set_termios          (struct usb_serial_port *port, struct ktermios *old_termios);
 static void empeg_write_bulk_callback  (struct urb *urb);
 static void empeg_read_bulk_callback   (struct urb *urb);
 
@@ -442,7 +442,7 @@ static int empeg_ioctl (struct usb_serial_port *port, struct file * file, unsign
 }
 
 
-static void empeg_set_termios (struct usb_serial_port *port, struct termios *old_termios)
+static void empeg_set_termios (struct usb_serial_port *port, struct ktermios *old_termios)
 {
 
        dbg("%s - port %d", __FUNCTION__, port->number);
index 72e4d48f51e9c18e9e6f4130dda00ad504261c0e..41b0ad2d56ac97062d353a12779f2d55e2610418 100644 (file)
@@ -595,7 +595,7 @@ static int  ftdi_chars_in_buffer    (struct usb_serial_port *port);
 static void ftdi_write_bulk_callback   (struct urb *urb);
 static void ftdi_read_bulk_callback    (struct urb *urb);
 static void ftdi_process_read          (struct work_struct *work);
-static void ftdi_set_termios           (struct usb_serial_port *port, struct termios * old);
+static void ftdi_set_termios           (struct usb_serial_port *port, struct ktermios * old);
 static int  ftdi_tiocmget               (struct usb_serial_port *port, struct file *file);
 static int  ftdi_tiocmset              (struct usb_serial_port *port, struct file * file, unsigned int set, unsigned int clear);
 static int  ftdi_ioctl                 (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg);
@@ -1880,7 +1880,7 @@ static void ftdi_break_ctl( struct usb_serial_port *port, int break_state )
  * WARNING: set_termios calls this with old_termios in kernel space
  */
 
-static void ftdi_set_termios (struct usb_serial_port *port, struct termios *old_termios)
+static void ftdi_set_termios (struct usb_serial_port *port, struct ktermios *old_termios)
 { /* ftdi_termios */
        struct usb_device *dev = port->serial->dev;
        unsigned int cflag = port->tty->termios->c_cflag;
index d06547a13f2823c85106099ab18361b3e4d866f2..f623d58370a4c2561a5be318a4d9f01a90f5b063 100644 (file)
@@ -229,7 +229,7 @@ static int  edge_write_room         (struct usb_serial_port *port);
 static int  edge_chars_in_buffer       (struct usb_serial_port *port);
 static void edge_throttle              (struct usb_serial_port *port);
 static void edge_unthrottle            (struct usb_serial_port *port);
-static void edge_set_termios           (struct usb_serial_port *port, struct termios *old_termios);
+static void edge_set_termios           (struct usb_serial_port *port, struct ktermios *old_termios);
 static int  edge_ioctl                 (struct usb_serial_port *port, struct file *file, unsigned int cmd, unsigned long arg);
 static void edge_break                 (struct usb_serial_port *port, int break_state);
 static int  edge_tiocmget              (struct usb_serial_port *port, struct file *file);
@@ -257,7 +257,7 @@ static void handle_new_lsr          (struct edgeport_port *edge_port, __u8 lsrData, __u8
 static int  send_iosp_ext_cmd          (struct edgeport_port *edge_port, __u8 command, __u8 param);
 static int  calc_baud_rate_divisor     (int baud_rate, int *divisor);
 static int  send_cmd_write_baud_rate   (struct edgeport_port *edge_port, int baudRate);
-static void change_port_settings       (struct edgeport_port *edge_port, struct termios *old_termios);
+static void change_port_settings       (struct edgeport_port *edge_port, struct ktermios *old_termios);
 static int  send_cmd_write_uart_register       (struct edgeport_port *edge_port, __u8 regNum, __u8 regValue);
 static int  write_cmd_usb              (struct edgeport_port *edge_port, unsigned char *buffer, int writeLength);
 static void send_more_port_data                (struct edgeport_serial *edge_serial, struct edgeport_port *edge_port);
@@ -1431,7 +1431,7 @@ static void edge_unthrottle (struct usb_serial_port *port)
  * SerialSetTermios
  *     this function is called by the tty driver when it wants to change the termios structure
  *****************************************************************************/
-static void edge_set_termios (struct usb_serial_port *port, struct termios *old_termios)
+static void edge_set_termios (struct usb_serial_port *port, struct ktermios *old_termios)
 {
        struct edgeport_port *edge_port = usb_get_serial_port_data(port);
        struct tty_struct *tty = port->tty;
@@ -2412,7 +2412,7 @@ static int send_cmd_write_uart_register (struct edgeport_port *edge_port, __u8 r
 #ifndef CMSPAR
 #define CMSPAR 0
 #endif
-static void change_port_settings (struct edgeport_port *edge_port, struct termios *old_termios)
+static void change_port_settings (struct edgeport_port *edge_port, struct ktermios *old_termios)
 {
        struct tty_struct *tty;
        int baud;
index ee0c921e15206458516409617ca1c648d1cfdf2d..2da2684e080982a4f72c91ee3c26b9c79a85568b 100644 (file)
@@ -238,7 +238,7 @@ static void edge_tty_recv(struct device *dev, struct tty_struct *tty, unsigned c
 static void stop_read(struct edgeport_port *edge_port);
 static int restart_read(struct edgeport_port *edge_port);
 
-static void edge_set_termios (struct usb_serial_port *port, struct termios *old_termios);
+static void edge_set_termios (struct usb_serial_port *port, struct ktermios *old_termios);
 static void edge_send(struct usb_serial_port *port);
 
 /* circular buffer */
@@ -2361,7 +2361,7 @@ static int restart_read(struct edgeport_port *edge_port)
        return status;
 }
 
-static void change_port_settings (struct edgeport_port *edge_port, struct termios *old_termios)
+static void change_port_settings (struct edgeport_port *edge_port, struct ktermios *old_termios)
 {
        struct ump_uart_config *config;
        struct tty_struct *tty;
@@ -2512,7 +2512,7 @@ static void change_port_settings (struct edgeport_port *edge_port, struct termio
        return;
 }
 
-static void edge_set_termios (struct usb_serial_port *port, struct termios *old_termios)
+static void edge_set_termios (struct usb_serial_port *port, struct ktermios *old_termios)
 {
        struct edgeport_port *edge_port = usb_get_serial_port_data(port);
        struct tty_struct *tty = port->tty;
index 331bf81556fcca1978b4bd4e2cac6ad358356f7a..8fdf486e346528a2d36363003e1e133dcf9e6310 100644 (file)
@@ -107,7 +107,7 @@ static void ir_close (struct usb_serial_port *port, struct file *filep);
 static int  ir_write (struct usb_serial_port *port, const unsigned char *buf, int count);
 static void ir_write_bulk_callback (struct urb *urb);
 static void ir_read_bulk_callback (struct urb *urb);
-static void ir_set_termios (struct usb_serial_port *port, struct termios *old_termios);
+static void ir_set_termios (struct usb_serial_port *port, struct ktermios *old_termios);
 
 static u8 ir_baud = 0;
 static u8 ir_xbof = 0;
@@ -497,7 +497,7 @@ static void ir_read_bulk_callback (struct urb *urb)
        return;
 }
 
-static void ir_set_termios (struct usb_serial_port *port, struct termios *old_termios)
+static void ir_set_termios (struct usb_serial_port *port, struct ktermios *old_termios)
 {
        unsigned char *transfer_buffer;
        unsigned int cflag;
index 7639652cec42f84e94356c6f453efbe9593ed27d..9d2fdfd6865f4bde3d5a7171338ad1398db34a7e 100644 (file)
@@ -264,7 +264,7 @@ static void keyspan_break_ctl (struct usb_serial_port *port, int break_state)
 
 
 static void keyspan_set_termios (struct usb_serial_port *port, 
-                                    struct termios *old_termios)
+                                    struct ktermios *old_termios)
 {
        int                             baud_rate, device_port;
        struct keyspan_port_private     *p_priv;
index 7472ed6bf62653dd581af8d3eb8333b17be13e13..6413d73c139cb39a0beb209aebe12e33e964ee2d 100644 (file)
@@ -59,7 +59,7 @@ static int  keyspan_ioctl             (struct usb_serial_port *port,
                                         unsigned int cmd,
                                         unsigned long arg);
 static void keyspan_set_termios                (struct usb_serial_port *port,
-                                        struct termios *old);
+                                        struct ktermios *old);
 static void keyspan_break_ctl          (struct usb_serial_port *port,
                                         int break_state);
 static int  keyspan_tiocmget           (struct usb_serial_port *port,
index e09a0bfe62316f2ad890edbbb0a4ea1b5704fdb9..126b9703bbaf1136f2a4f50ab432982c44f09ba6 100644 (file)
@@ -365,7 +365,7 @@ static void keyspan_pda_break_ctl (struct usb_serial_port *port, int break_state
 
 
 static void keyspan_pda_set_termios (struct usb_serial_port *port, 
-                                    struct termios *old_termios)
+                                    struct ktermios *old_termios)
 {
        struct usb_serial *serial = port->serial;
        unsigned int cflag = port->tty->termios->c_cflag;
index 17e205699c2bca32970e0c2b26e79095ea7e91ae..73d755df4840e32527dfbb10386723726295f4cc 100644 (file)
@@ -86,7 +86,7 @@ static int  klsi_105_write_room          (struct usb_serial_port *port);
 
 static void klsi_105_read_bulk_callback  (struct urb *urb);
 static void klsi_105_set_termios         (struct usb_serial_port *port,
-                                         struct termios * old);
+                                         struct ktermios *old);
 static int  klsi_105_ioctl              (struct usb_serial_port *port,
                                          struct file * file,
                                          unsigned int cmd,
@@ -164,7 +164,7 @@ struct klsi_105_port_settings {
 #define URB_TRANSFER_BUFFER_SIZE       64
 struct klsi_105_private {
        struct klsi_105_port_settings   cfg;
-       struct termios                  termios;
+       struct ktermios                 termios;
        unsigned long                   line_state; /* modem line settings */
        /* write pool */
        struct urb *                    write_urb_pool[NUM_URBS];
@@ -688,7 +688,7 @@ static void klsi_105_read_bulk_callback (struct urb *urb)
 
 
 static void klsi_105_set_termios (struct usb_serial_port *port,
-                                 struct termios *old_termios)
+                                 struct ktermios *old_termios)
 {
        struct klsi_105_private *priv = usb_get_serial_port_data(port);
        unsigned int iflag = port->tty->termios->c_iflag;
index 237289920f03deb7438cda346fbd54966dd34d80..e284d6c0fd35b03f5f42c97ff6af5358463bd1a3 100644 (file)
@@ -136,7 +136,7 @@ struct kobil_private {
        int cur_pos; // index of the next char to send in buf
        __u16 device_type;
        int line_state;
-       struct termios internal_termios;
+       struct ktermios internal_termios;
 };
 
 
@@ -624,11 +624,11 @@ static int  kobil_ioctl(struct usb_serial_port *port, struct file *file,
 
        switch (cmd) {
        case TCGETS:   // 0x5401
-               if (!access_ok(VERIFY_WRITE, user_arg, sizeof(struct termios))) {
+               if (!access_ok(VERIFY_WRITE, user_arg, sizeof(struct ktermios))) {
                        dbg("%s - port %d Error in access_ok", __FUNCTION__, port->number);
                        return -EFAULT;
                }
-               if (kernel_termios_to_user_termios((struct termios __user *)arg,
+               if (kernel_termios_to_user_termios((struct ktermios __user *)arg,
                                                   &priv->internal_termios))
                        return -EFAULT;
                return 0;
@@ -638,12 +638,12 @@ static int  kobil_ioctl(struct usb_serial_port *port, struct file *file,
                        dbg("%s - port %d Error: port->tty->termios is NULL", __FUNCTION__, port->number);
                        return -ENOTTY;
                }
-               if (!access_ok(VERIFY_READ, user_arg, sizeof(struct termios))) {
+               if (!access_ok(VERIFY_READ, user_arg, sizeof(struct ktermios))) {
                        dbg("%s - port %d Error in access_ok", __FUNCTION__, port->number);
                        return -EFAULT;
                }
                if (user_termios_to_kernel_termios(&priv->internal_termios,
-                                                  (struct termios __user *)arg))
+                                                  (struct ktermios __user *)arg))
                        return -EFAULT;
                
                settings = kzalloc(50, GFP_KERNEL);
index a906e500a02b0748a7e73f2a4e582a498ddda579..38b1d17e06ef797149f74fc32b9dde2d3225f7c5 100644 (file)
@@ -98,7 +98,7 @@ static void mct_u232_close             (struct usb_serial_port *port,
                                          struct file *filp);
 static void mct_u232_read_int_callback   (struct urb *urb);
 static void mct_u232_set_termios         (struct usb_serial_port *port,
-                                         struct termios * old);
+                                         struct ktermios * old);
 static int  mct_u232_ioctl              (struct usb_serial_port *port,
                                          struct file * file,
                                          unsigned int cmd,
@@ -556,7 +556,7 @@ exit:
 } /* mct_u232_read_int_callback */
 
 static void mct_u232_set_termios (struct usb_serial_port *port,
-                                 struct termios *old_termios)
+                                 struct ktermios *old_termios)
 {
        struct usb_serial *serial = port->serial;
        struct mct_u232_private *priv = usb_get_serial_port_data(port);
index 70f93b18292f7ce26c3a12ee7eb2c0c0d61e3d7b..e55f4ed81d7bc3344a21b119f6e941b54c074d0c 100644 (file)
@@ -1014,7 +1014,7 @@ static int send_cmd_write_baud_rate(struct moschip_port *mos7720_port,
  *      the specified new settings.
  */
 static void change_port_settings(struct moschip_port *mos7720_port,
-                                struct termios *old_termios)
+                                struct ktermios *old_termios)
 {
        struct usb_serial_port *port;
        struct usb_serial *serial;
@@ -1203,7 +1203,7 @@ static void change_port_settings(struct moschip_port *mos7720_port,
  *     termios structure.
  */
 static void mos7720_set_termios(struct usb_serial_port *port,
-                               struct termios *old_termios)
+                               struct ktermios *old_termios)
 {
        int status;
        unsigned int cflag;
index 5432c63400862dd962336de2a051cfe88cc2c329..8cc728a49e41fce1b644e42507c2106491bc6ac6 100644 (file)
@@ -1931,7 +1931,7 @@ static int mos7840_send_cmd_write_baud_rate(struct moschip_port *mos7840_port,
  *****************************************************************************/
 
 static void mos7840_change_port_settings(struct moschip_port *mos7840_port,
-                                        struct termios *old_termios)
+                                        struct ktermios *old_termios)
 {
        struct tty_struct *tty;
        int baud;
@@ -2118,7 +2118,7 @@ static void mos7840_change_port_settings(struct moschip_port *mos7840_port,
  *****************************************************************************/
 
 static void mos7840_set_termios(struct usb_serial_port *port,
-                               struct termios *old_termios)
+                               struct ktermios *old_termios)
 {
        int status;
        unsigned int cflag;
index 130afbbd3fca6c97b9e8c9400961b1583eca6c72..0ae4098718c360601976de27738cad3264b5a0c0 100644 (file)
@@ -59,7 +59,7 @@ static int  option_chars_in_buffer(struct usb_serial_port *port);
 static int  option_ioctl(struct usb_serial_port *port, struct file *file,
                        unsigned int cmd, unsigned long arg);
 static void option_set_termios(struct usb_serial_port *port,
-                               struct termios *old);
+                               struct ktermios *old);
 static void option_break_ctl(struct usb_serial_port *port, int break_state);
 static int  option_tiocmget(struct usb_serial_port *port, struct file *file);
 static int  option_tiocmset(struct usb_serial_port *port, struct file *file,
@@ -230,7 +230,7 @@ static void option_break_ctl(struct usb_serial_port *port, int break_state)
 }
 
 static void option_set_termios(struct usb_serial_port *port,
-                       struct termios *old_termios)
+                       struct ktermios *old_termios)
 {
        dbg("%s", __FUNCTION__);
 
index bc800c8787a87a1bc048ae225abd2e695ee3e07b..d124d780e42e27703216908337f011094d181c4c 100644 (file)
@@ -455,7 +455,7 @@ static int pl2303_chars_in_buffer(struct usb_serial_port *port)
 }
 
 static void pl2303_set_termios(struct usb_serial_port *port,
-                              struct termios *old_termios)
+                              struct ktermios *old_termios)
 {
        struct usb_serial *serial = port->serial;
        struct pl2303_private *priv = usb_get_serial_port_data(port);
@@ -687,7 +687,7 @@ static void pl2303_close(struct usb_serial_port *port, struct file *filp)
 
 static int pl2303_open(struct usb_serial_port *port, struct file *filp)
 {
-       struct termios tmp_termios;
+       struct ktermios tmp_termios;
        struct usb_serial *serial = port->serial;
        struct pl2303_private *priv = usb_get_serial_port_data(port);
        unsigned char *buf;
index 4b5097fa48d726cbeb7e66e8b8a45840fedda1a3..6d8e91e00ecff4031613cdb9a1adbf438bf855ef 100644 (file)
@@ -145,7 +145,7 @@ static void sierra_break_ctl(struct usb_serial_port *port, int break_state)
 }
 
 static void sierra_set_termios(struct usb_serial_port *port,
-                       struct termios *old_termios)
+                       struct ktermios *old_termios)
 {
        dbg("%s", __FUNCTION__);
 
index ae98d8cbdbb8712f2b214f5192193ba75a6017bf..f42eb9ea64052a1a9d6dc90ee59966fc392a9c90 100644 (file)
@@ -161,7 +161,7 @@ static void ti_throttle(struct usb_serial_port *port);
 static void ti_unthrottle(struct usb_serial_port *port);
 static int ti_ioctl(struct usb_serial_port *port, struct file *file, unsigned int cmd, unsigned long arg);
 static void ti_set_termios(struct usb_serial_port *port,
-       struct termios *old_termios);
+       struct ktermios *old_termios);
 static int ti_tiocmget(struct usb_serial_port *port, struct file *file);
 static int ti_tiocmset(struct usb_serial_port *port, struct file *file,
        unsigned int set, unsigned int clear);
@@ -881,7 +881,7 @@ static int ti_ioctl(struct usb_serial_port *port, struct file *file,
 
 
 static void ti_set_termios(struct usb_serial_port *port,
-       struct termios *old_termios)
+       struct ktermios *old_termios)
 {
        struct ti_port *tport = usb_get_serial_port_data(port);
        struct tty_struct *tty = port->tty;
index 3d5072f14b8d049081fbc2c88fad03bb157f6e9b..716f6806cc8902e055a7af4298e554e0512dcbc6 100644 (file)
@@ -397,7 +397,7 @@ exit:
        return retval;
 }
 
-static void serial_set_termios (struct tty_struct *tty, struct termios * old)
+static void serial_set_termios (struct tty_struct *tty, struct ktermios * old)
 {
        struct usb_serial_port *port = tty->driver_data;
 
index eef5eaa5fa0bae67ebb82648cc20af507d29b226..b09f06096056f211ed129d54b2ef9b17ac43dc53 100644 (file)
@@ -46,7 +46,7 @@ static int  visor_probe               (struct usb_serial *serial, const struct usb_device_id
 static int  visor_calc_num_ports(struct usb_serial *serial);
 static void visor_shutdown     (struct usb_serial *serial);
 static int  visor_ioctl                (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg);
-static void visor_set_termios  (struct usb_serial_port *port, struct termios *old_termios);
+static void visor_set_termios  (struct usb_serial_port *port, struct ktermios *old_termios);
 static void visor_write_bulk_callback  (struct urb *urb);
 static void visor_read_bulk_callback   (struct urb *urb);
 static void visor_read_int_callback    (struct urb *urb);
@@ -916,7 +916,7 @@ static int visor_ioctl (struct usb_serial_port *port, struct file * file, unsign
 
 
 /* This function is all nice and good, but we don't change anything based on it :) */
-static void visor_set_termios (struct usb_serial_port *port, struct termios *old_termios)
+static void visor_set_termios (struct usb_serial_port *port, struct ktermios *old_termios)
 {
        unsigned int cflag;
 
index 154c7d290597776b82b9ec076db976b4eff228e6..dc45e58e2b8c88892e92bcecacc5fdba32a839ee 100644 (file)
@@ -145,7 +145,7 @@ static void whiteheat_close         (struct usb_serial_port *port, struct file *filp);
 static int  whiteheat_write            (struct usb_serial_port *port, const unsigned char *buf, int count);
 static int  whiteheat_write_room       (struct usb_serial_port *port);
 static int  whiteheat_ioctl            (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg);
-static void whiteheat_set_termios      (struct usb_serial_port *port, struct termios * old);
+static void whiteheat_set_termios      (struct usb_serial_port *port, struct ktermios * old);
 static int  whiteheat_tiocmget         (struct usb_serial_port *port, struct file *file);
 static int  whiteheat_tiocmset         (struct usb_serial_port *port, struct file *file, unsigned int set, unsigned int clear);
 static void whiteheat_break_ctl                (struct usb_serial_port *port, int break_state);
@@ -597,7 +597,7 @@ static void whiteheat_shutdown (struct usb_serial *serial)
 static int whiteheat_open (struct usb_serial_port *port, struct file *filp)
 {
        int             retval = 0;
-       struct termios  old_term;
+       struct ktermios old_term;
 
        dbg("%s - port %d", __FUNCTION__, port->number);
 
@@ -870,7 +870,7 @@ static int whiteheat_ioctl (struct usb_serial_port *port, struct file * file, un
 }
 
 
-static void whiteheat_set_termios (struct usb_serial_port *port, struct termios *old_termios)
+static void whiteheat_set_termios (struct usb_serial_port *port, struct ktermios *old_termios)
 {
        dbg("%s -port %d", __FUNCTION__, port->number);
 
index 1e58ca39592c97eebbe9fe9551a43fa42e7a5cfe..3769e6bd63b17e1da41416fe13defc1d7107a0d1 100644 (file)
@@ -11,7 +11,7 @@
 /*
  * Translate a "termio" structure into a "termios". Ugh.
  */
-static inline int user_termio_to_kernel_termios(struct termios *termios,
+static inline int user_termio_to_kernel_termios(struct ktermios *termios,
                                                struct termio __user *termio)
 {
        unsigned short tmp;
@@ -48,7 +48,7 @@ static inline int user_termio_to_kernel_termios(struct termios *termios,
  * Translate a "termios" structure into a "termio". Ugh.
  */
 static inline int kernel_termios_to_user_termio(struct termio __user *termio,
-                                               struct termios *termios)
+                                               struct ktermios *termios)
 {
        if (put_user(termios->c_iflag, &termio->c_iflag) < 0 ||
            put_user(termios->c_oflag, &termio->c_oflag) < 0 ||
index b572f21b32c4b188a6f250303cece2256f8531e7..5e79198f7d18d2ad6223bc0f6aeea191ee6190ea 100644 (file)
@@ -37,8 +37,8 @@ struct ktermios {
        tcflag_t c_oflag;               /* output mode flags */
        tcflag_t c_cflag;               /* control mode flags */
        tcflag_t c_lflag;               /* local mode flags */
-       cc_t c_line;                    /* line discipline */
        cc_t c_cc[NCCS];                /* control characters */
+       cc_t c_line;                    /* line discipline (== c_cc[19]) */
        speed_t c_ispeed;               /* input speed */
        speed_t c_ospeed;               /* output speed */
 };
index e2538456195568141da767ace0da9ec5abe08a3d..5412da28fa4749daa9822bd4b99f82a61628388a 100644 (file)
@@ -91,7 +91,7 @@ void gs_hangup(struct tty_struct *tty);
 int  gs_block_til_ready(void *port, struct file *filp);
 void gs_close(struct tty_struct *tty, struct file *filp);
 void gs_set_termios (struct tty_struct * tty, 
-                     struct termios * old_termios);
+                     struct ktermios * old_termios);
 int  gs_init_port(struct gs_port *port);
 int  gs_setserial(struct gs_port *port, struct serial_struct __user *sp);
 int  gs_getserial(struct gs_port *port, struct serial_struct __user *sp);
index 62991148d5a53aa8df83180ce0e61a6943b7bc36..3c7875b7ab5be00cd0ee375cf61904be3c6ca122 100644 (file)
@@ -511,8 +511,8 @@ typedef struct modem_info {
 #endif
   struct tty_struct    *tty;            /* Pointer to corresponding tty   */
   atemu                 emu;             /* AT-emulator data               */
-  struct termios       normal_termios;  /* For saving termios structs     */
-  struct termios       callout_termios;
+  struct ktermios      normal_termios;  /* For saving termios structs     */
+  struct ktermios      callout_termios;
   wait_queue_head_t    open_wait, close_wait;
   struct semaphore      write_sem;
   spinlock_t           readlock;
@@ -525,8 +525,8 @@ typedef struct _isdn_modem {
   int                refcount;                         /* Number of opens        */
   struct tty_driver  *tty_modem;                       /* tty-device             */
   struct tty_struct  *modem_table[ISDN_MAX_CHANNELS];  /* ?? copied from Orig    */
-  struct termios     *modem_termios[ISDN_MAX_CHANNELS];
-  struct termios     *modem_termios_locked[ISDN_MAX_CHANNELS];
+  struct ktermios     *modem_termios[ISDN_MAX_CHANNELS];
+  struct ktermios     *modem_termios_locked[ISDN_MAX_CHANNELS];
   modem_info         info[ISDN_MAX_CHANNELS];     /* Private data           */
 } isdn_modem_t;
 
index 827672136646a1be0d32e84003c3f5eaf0a32907..cf23813cbec2a449cadec31f9d68e50e4a4f0bf3 100644 (file)
@@ -166,8 +166,8 @@ struct uart_ops {
        void            (*break_ctl)(struct uart_port *, int ctl);
        int             (*startup)(struct uart_port *);
        void            (*shutdown)(struct uart_port *);
-       void            (*set_termios)(struct uart_port *, struct termios *new,
-                                      struct termios *old);
+       void            (*set_termios)(struct uart_port *, struct ktermios *new,
+                                      struct ktermios *old);
        void            (*pm)(struct uart_port *, unsigned int state,
                              unsigned int oldstate);
        int             (*set_wake)(struct uart_port *, unsigned int state);
@@ -361,8 +361,8 @@ void uart_write_wakeup(struct uart_port *port);
  */
 void uart_update_timeout(struct uart_port *port, unsigned int cflag,
                         unsigned int baud);
-unsigned int uart_get_baud_rate(struct uart_port *port, struct termios *termios,
-                               struct termios *old, unsigned int min,
+unsigned int uart_get_baud_rate(struct uart_port *port, struct ktermios *termios,
+                               struct ktermios *old, unsigned int min,
                                unsigned int max);
 unsigned int uart_get_divisor(struct uart_port *port, unsigned int baud);
 
index 91b3ea2bbb149fbbf283cc8b297abddb8cca08ae..10f99e5f1a971fc85cdd7b6bed897afce6acdbf8 100644 (file)
@@ -218,7 +218,7 @@ struct usb_serial_driver {
        int  (*write)           (struct usb_serial_port *port, const unsigned char *buf, int count);
        int  (*write_room)      (struct usb_serial_port *port);
        int  (*ioctl)           (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg);
-       void (*set_termios)     (struct usb_serial_port *port, struct termios * old);
+       void (*set_termios)     (struct usb_serial_port *port, struct ktermios * old);
        void (*break_ctl)       (struct usb_serial_port *port, int break_state);
        int  (*chars_in_buffer) (struct usb_serial_port *port);
        void (*throttle)        (struct usb_serial_port *port);
index 1fb5d42f37ae959c05dc92df929924250eeca90a..e0e0d09023b2f0607e295397a699e5d7b2c55c25 100644 (file)
@@ -752,9 +752,9 @@ static int rfcomm_tty_ioctl(struct tty_struct *tty, struct file *filp, unsigned
        return -ENOIOCTLCMD;
 }
 
-static void rfcomm_tty_set_termios(struct tty_struct *tty, struct termios *old)
+static void rfcomm_tty_set_termios(struct tty_struct *tty, struct ktermios *old)
 {
-       struct termios *new = (struct termios *) tty->termios;
+       struct ktermios *new = tty->termios;
        int old_baud_rate = tty_termios_baud_rate(old);
        int new_baud_rate = tty_termios_baud_rate(new);