dect
/
linux-2.6
Archived
13
0
Fork 0

[PATCH] tty: switch to ktermios

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>
This commit is contained in:
Alan Cox 2006-12-08 02:38:45 -08:00 committed by Linus Torvalds
parent edc6afc549
commit 606d099cdd
113 changed files with 301 additions and 253 deletions

View File

@ -246,7 +246,7 @@ out_up:
return ret; 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 */ /* nothing */
} }

View 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, extern int line_write(struct tty_struct *tty, const unsigned char *buf,
int len); int len);
extern void line_put_char(struct tty_struct *tty, unsigned char ch); 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 int line_chars_in_buffer(struct tty_struct *tty);
extern void line_flush_buffer(struct tty_struct *tty); extern void line_flush_buffer(struct tty_struct *tty);
extern void line_flush_chars(struct tty_struct *tty); extern void line_flush_chars(struct tty_struct *tty);

View File

@ -104,7 +104,7 @@ static struct async_struct *IRQ_ports;
static unsigned char current_ctl_bits; 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); 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. * the specified baud rate for a serial port.
*/ */
static void change_speed(struct async_struct *info, static void change_speed(struct async_struct *info,
struct termios *old_termios) struct ktermios *old_termios)
{ {
int quot = 0, baud_base, baud; int quot = 0, baud_base, baud;
unsigned cflag, cval = 0; unsigned cflag, cval = 0;
@ -1365,7 +1365,7 @@ static int rs_ioctl(struct tty_struct *tty, struct file * file,
return 0; 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; struct async_struct *info = (struct async_struct *)tty->driver_data;
unsigned long flags; unsigned long flags;

View File

@ -4101,7 +4101,7 @@ cy_ioctl(struct tty_struct *tty, struct file * file,
* where old == NULL, and try to do something rational. * where old == NULL, and try to do something rational.
*/ */
static void 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; struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;

View File

@ -199,7 +199,7 @@ static int pc_ioctl(struct tty_struct *, struct file *,
unsigned int, unsigned long); unsigned int, unsigned long);
static int info_ioctl(struct tty_struct *, struct file *, static int info_ioctl(struct tty_struct *, struct file *,
unsigned int, unsigned long); 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 do_softint(struct work_struct *work);
static void pc_stop(struct tty_struct *); static void pc_stop(struct tty_struct *);
static void pc_start(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_oflag = 0;
pc_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL | HUPCL; pc_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL | HUPCL;
pc_driver->init_termios.c_lflag = 0; 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; pc_driver->flags = TTY_DRIVER_REAL_RAW;
tty_set_operations(pc_driver, &pc_ops); 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_oflag = 0;
pc_info->init_termios.c_lflag = 0; pc_info->init_termios.c_lflag = 0;
pc_info->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL; 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; pc_info->flags = TTY_DRIVER_REAL_RAW;
tty_set_operations(pc_info, &info_ops); tty_set_operations(pc_info, &info_ops);
@ -1999,7 +2003,7 @@ static void epcaparam(struct tty_struct *tty, struct channel *ch)
{ /* Begin epcaparam */ { /* Begin epcaparam */
unsigned int cmdHead; unsigned int cmdHead;
struct termios *ts; struct ktermios *ts;
struct board_chan __iomem *bc; struct board_chan __iomem *bc;
unsigned mval, hflow, cflag, iflag; unsigned mval, hflow, cflag, iflag;
@ -2114,7 +2118,7 @@ static void receive_data(struct channel *ch)
{ /* Begin receive_data */ { /* Begin receive_data */
unchar *rptr; unchar *rptr;
struct termios *ts = NULL; struct ktermios *ts = NULL;
struct tty_struct *tty; struct tty_struct *tty;
struct board_chan __iomem *bc; struct board_chan __iomem *bc;
int dataToRead, wrapgap, bytesAvailable; int dataToRead, wrapgap, bytesAvailable;
@ -2362,12 +2366,14 @@ static int pc_ioctl(struct tty_struct *tty, struct file * file,
switch (cmd) switch (cmd)
{ /* Begin switch cmd */ { /* Begin switch cmd */
#if 0 /* Handled by calling layer properly */
case TCGETS: 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 -EFAULT;
return 0; return 0;
case TCGETA: case TCGETA:
return get_termio(tty, argp); return get_termio(tty, argp);
#endif
case TCSBRK: /* SVID version: non-zero arg --> no break */ case TCSBRK: /* SVID version: non-zero arg --> no break */
retval = tty_check_change(tty); retval = tty_check_change(tty);
if (retval) if (retval)
@ -2536,7 +2542,7 @@ static int pc_ioctl(struct tty_struct *tty, struct file * file,
/* --------------------- Begin pc_set_termios ----------------------- */ /* --------------------- 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 */ { /* Begin pc_set_termios */
struct channel *ch; struct channel *ch;

View File

@ -1915,7 +1915,7 @@ static int rs_ioctl(struct tty_struct *tty, struct file * file,
return 0; 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; struct esp_struct *info = (struct esp_struct *)tty->driver_data;
unsigned long flags; unsigned long flags;

View File

@ -718,11 +718,11 @@ static unsigned int gs_baudrates[] = {
void gs_set_termios (struct tty_struct * tty, void gs_set_termios (struct tty_struct * tty,
struct termios * old_termios) struct ktermios * old_termios)
{ {
struct gs_port *port; struct gs_port *port;
int baudrate, tmp, rv; int baudrate, tmp, rv;
struct termios *tiosp; struct ktermios *tiosp;
func_enter(); func_enter();

View File

@ -192,11 +192,13 @@ MODULE_VERSION(HVCS_DRIVER_VERSION);
* that will cause echoing or we'll go into recursive loop echoing chars back * that will cause echoing or we'll go into recursive loop echoing chars back
* and forth with the console drivers. * and forth with the console drivers.
*/ */
static struct termios hvcs_tty_termios = { static struct ktermios hvcs_tty_termios = {
.c_iflag = IGNBRK | IGNPAR, .c_iflag = IGNBRK | IGNPAR,
.c_oflag = OPOST, .c_oflag = OPOST,
.c_cflag = B38400 | CS8 | CREAD | HUPCL, .c_cflag = B38400 | CS8 | CREAD | HUPCL,
.c_cc = INIT_C_CC .c_cc = INIT_C_CC,
.c_ispeed = 38400,
.c_ospeed = 38400
}; };
/* /*

View File

@ -1161,6 +1161,8 @@ static int __init hvsi_init(void)
hvsi_driver->type = TTY_DRIVER_TYPE_SYSTEM; hvsi_driver->type = TTY_DRIVER_TYPE_SYSTEM;
hvsi_driver->init_termios = tty_std_termios; hvsi_driver->init_termios = tty_std_termios;
hvsi_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL; 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; hvsi_driver->flags = TTY_DRIVER_REAL_RAW;
tty_set_operations(hvsi_driver, &hvsi_ops); tty_set_operations(hvsi_driver, &hvsi_ops);

View File

@ -177,7 +177,7 @@ static int ip2_write_room(PTTY);
static int ip2_chars_in_buf(PTTY); static int ip2_chars_in_buf(PTTY);
static void ip2_flush_buffer(PTTY); static void ip2_flush_buffer(PTTY);
static int ip2_ioctl(PTTY, struct file *, UINT, ULONG); 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_set_line_discipline(PTTY);
static void ip2_throttle(PTTY); static void ip2_throttle(PTTY);
static void ip2_unthrottle(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 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 get_serial_info(i2ChanStrPtr, struct serial_struct __user *);
static int set_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 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; i2ChanStrPtr pCh = (i2ChanStrPtr)tty->driver_data;
@ -2440,11 +2440,11 @@ ip2_set_line_discipline ( PTTY tty )
/* change. */ /* change. */
/******************************************************************************/ /******************************************************************************/
static void static void
set_params( i2ChanStrPtr pCh, struct termios *o_tios ) set_params( i2ChanStrPtr pCh, struct ktermios *o_tios )
{ {
tcflag_t cflag, iflag, lflag; tcflag_t cflag, iflag, lflag;
char stop_char, start_char; char stop_char, start_char;
struct termios dummy; struct ktermios dummy;
lflag = pCh->pTTY->termios->c_lflag; lflag = pCh->pTTY->termios->c_lflag;
cflag = pCh->pTTY->termios->c_cflag; cflag = pCh->pTTY->termios->c_cflag;

View File

@ -1399,7 +1399,7 @@ static int isicom_ioctl(struct tty_struct *tty, struct file *filp,
/* set_termios et all */ /* set_termios et all */
static void isicom_set_termios(struct tty_struct *tty, static void isicom_set_termios(struct tty_struct *tty,
struct termios *old_termios) struct ktermios *old_termios)
{ {
struct isi_port *port = tty->driver_data; struct isi_port *port = tty->driver_data;

View File

@ -194,9 +194,11 @@ static struct tty_struct *stli_txcooktty;
* with this termios initially. Basically all it defines is a raw port * with this termios initially. Basically all it defines is a raw port
* at 9600 baud, 8 data bits, no parity, 1 stop bit. * 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_cflag = (B9600 | CS8 | CREAD | HUPCL | CLOCAL),
.c_cc = INIT_C_CC, .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_writeroom(struct tty_struct *tty);
static int stli_charsinbuffer(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 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_throttle(struct tty_struct *tty);
static void stli_unthrottle(struct tty_struct *tty); static void stli_unthrottle(struct tty_struct *tty);
static void stli_stop(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_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_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 void stli_mkasysigs(asysigs_t *sp, int dtr, int rts);
static long stli_mktiocm(unsigned long sigvalue); static long stli_mktiocm(unsigned long sigvalue);
static void stli_read(stlibrd_t *brdp, stliport_t *portp); 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..!! * 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; stliport_t *portp;
stlibrd_t *brdp; stlibrd_t *brdp;
struct termios *tiosp; struct ktermios *tiosp;
asyport_t aport; asyport_t aport;
if (tty == NULL) if (tty == NULL)
@ -2730,7 +2732,7 @@ static void stli_poll(unsigned long arg)
* the slave. * 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)); memset(pp, 0, sizeof(asyport_t));

View 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 int moxa_ioctl(struct tty_struct *, struct file *, unsigned int, unsigned long);
static void moxa_throttle(struct tty_struct *); static void moxa_throttle(struct tty_struct *);
static void moxa_unthrottle(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_stop(struct tty_struct *);
static void moxa_start(struct tty_struct *); static void moxa_start(struct tty_struct *);
static void moxa_hangup(struct tty_struct *); static void moxa_hangup(struct tty_struct *);
@ -261,7 +261,7 @@ static void MoxaPortEnable(int);
static void MoxaPortDisable(int); static void MoxaPortDisable(int);
static long MoxaPortGetMaxBaud(int); static long MoxaPortGetMaxBaud(int);
static long MoxaPortSetBaud(int, long); 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 int MoxaPortGetLineOut(int, int *, int *);
static void MoxaPortLineCtrl(int, int, int); static void MoxaPortLineCtrl(int, int, int);
static void MoxaPortFlowCtrl(int, int, int, 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_oflag = 0;
moxaDriver->init_termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL | HUPCL; moxaDriver->init_termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL | HUPCL;
moxaDriver->init_termios.c_lflag = 0; moxaDriver->init_termios.c_lflag = 0;
moxaDriver->init_termios.c_ispeed = 9600;
moxaDriver->init_termios.c_ospeed = 9600;
moxaDriver->flags = TTY_DRIVER_REAL_RAW; moxaDriver->flags = TTY_DRIVER_REAL_RAW;
tty_set_operations(moxaDriver, &moxa_ops); 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, 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; 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) static void set_tty_param(struct tty_struct *tty)
{ {
register struct termios *ts; register struct ktermios *ts;
struct moxa_str *ch; struct moxa_str *ch;
int rts, cts, txflow, rxflow, xany; 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) static void receive_data(struct moxa_str *ch)
{ {
struct tty_struct *tp; struct tty_struct *tp;
struct termios *ts; struct ktermios *ts;
unsigned long flags; unsigned long flags;
ts = NULL; ts = NULL;
@ -1912,9 +1914,9 @@ int MoxaPortsOfCard(int cardno)
* *
* Function 12: Configure the port. * Function 12: Configure the port.
* Syntax: * 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) * int port : port number (0 - 127)
* struct termios * termio : termio structure pointer * struct ktermios * termio : termio structure pointer
* speed_t baud : baud rate * speed_t baud : baud rate
* *
* return: -1 : this port is invalid or termio == NULL * return: -1 : this port is invalid or termio == NULL
@ -2195,7 +2197,7 @@ long MoxaPortSetBaud(int port, long baud)
return (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; void __iomem *ofsAddr;
tcflag_t cflag; tcflag_t cflag;

View File

@ -328,8 +328,8 @@ struct mxser_struct {
int xmit_tail; int xmit_tail;
int xmit_cnt; int xmit_cnt;
struct work_struct tqueue; struct work_struct tqueue;
struct termios normal_termios; struct ktermios normal_termios;
struct termios callout_termios; struct ktermios callout_termios;
wait_queue_head_t open_wait; wait_queue_head_t open_wait;
wait_queue_head_t close_wait; wait_queue_head_t close_wait;
wait_queue_head_t delta_msr_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 tty_driver *mxvar_sdriver;
static struct mxser_struct mxvar_table[MXSER_PORTS]; static struct mxser_struct mxvar_table[MXSER_PORTS];
static struct tty_struct *mxvar_tty[MXSER_PORTS + 1]; static struct tty_struct *mxvar_tty[MXSER_PORTS + 1];
static struct termios *mxvar_termios[MXSER_PORTS + 1]; static struct ktermios *mxvar_termios[MXSER_PORTS + 1];
static struct termios *mxvar_termios_locked[MXSER_PORTS + 1]; static struct ktermios *mxvar_termios_locked[MXSER_PORTS + 1];
static struct mxser_log mxvar_log; static struct mxser_log mxvar_log;
static int mxvar_diagflag; static int mxvar_diagflag;
static unsigned char mxser_msr[MXSER_PORTS + 1]; 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 int mxser_ioctl_special(unsigned int, void __user *);
static void mxser_throttle(struct tty_struct *); static void mxser_throttle(struct tty_struct *);
static void mxser_unthrottle(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_stop(struct tty_struct *);
static void mxser_start(struct tty_struct *); static void mxser_start(struct tty_struct *);
static void mxser_hangup(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_block_til_ready(struct tty_struct *, struct file *, struct mxser_struct *);
static int mxser_startup(struct mxser_struct *); static int mxser_startup(struct mxser_struct *);
static void mxser_shutdown(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_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_set_serial_info(struct mxser_struct *, struct serial_struct __user *);
static int mxser_get_lsr_info(struct mxser_struct *, unsigned int __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->subtype = SERIAL_TYPE_NORMAL;
mxvar_sdriver->init_termios = tty_std_termios; mxvar_sdriver->init_termios = tty_std_termios;
mxvar_sdriver->init_termios.c_cflag = B9600|CS8|CREAD|HUPCL|CLOCAL; 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; mxvar_sdriver->flags = TTY_DRIVER_REAL_RAW;
tty_set_operations(mxvar_sdriver, &mxser_ops); tty_set_operations(mxvar_sdriver, &mxser_ops);
mxvar_sdriver->ttys = mxvar_tty; mxvar_sdriver->ttys = mxvar_tty;
@ -1749,7 +1751,7 @@ static void mxser_unthrottle(struct tty_struct *tty)
/* MX_UNLOCK(&info->slock); */ /* 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; struct mxser_struct *info = tty->driver_data;
unsigned long flags; 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 * This routine is called to set the UART divisor registers to match
* the specified baud rate for a serial port. * 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; unsigned cflag, cval, fcr;
int ret = 0; int ret = 0;

View File

@ -266,8 +266,8 @@ struct mxser_port {
int xmit_tail; int xmit_tail;
int xmit_cnt; int xmit_cnt;
struct termios normal_termios; struct ktermios normal_termios;
struct termios callout_termios; struct ktermios callout_termios;
struct mxser_mon mon_data; 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. * the specified baud rate for a serial port.
*/ */
static int mxser_change_speed(struct mxser_port *info, static int mxser_change_speed(struct mxser_port *info,
struct termios *old_termios) struct ktermios *old_termios)
{ {
unsigned cflag, cval, fcr; unsigned cflag, cval, fcr;
int ret = 0; int ret = 0;
@ -1966,7 +1966,7 @@ static void mxser_start(struct tty_struct *tty)
spin_unlock_irqrestore(&info->slock, flags); 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; struct mxser_port *info = tty->driver_data;
unsigned long flags; unsigned long flags;

View File

@ -142,7 +142,7 @@ static ssize_t r3964_write(struct tty_struct * tty, struct file * file,
const unsigned char * buf, size_t nr); const unsigned char * buf, size_t nr);
static int r3964_ioctl(struct tty_struct * tty, struct file * file, static int r3964_ioctl(struct tty_struct * tty, struct file * file,
unsigned int cmd, unsigned long arg); 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, static unsigned int r3964_poll(struct tty_struct * tty, struct file * file,
struct poll_table_struct *wait); struct poll_table_struct *wait);
static void r3964_receive_buf(struct tty_struct *tty, const unsigned char *cp, 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"); TRACE_L("set_termios");
} }

View File

@ -994,7 +994,7 @@ int is_ignored(int sig)
* when the ldisc is closed. * 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) if (!tty)
return; return;

View File

@ -2375,7 +2375,7 @@ static int ioctl_common(MGSLPC_INFO *info, unsigned int cmd, unsigned long arg)
* tty pointer to tty structure * tty pointer to tty structure
* termios pointer to buffer to hold returned old termios * 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; MGSLPC_INFO *info = (MGSLPC_INFO *)tty->driver_data;
unsigned long flags; unsigned long flags;

View File

@ -218,7 +218,7 @@ out:
return retval; 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 &= ~(CSIZE | PARENB);
tty->termios->c_cflag |= (CS8 | CREAD); 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_oflag = 0;
pty_driver->init_termios.c_cflag = B38400 | CS8 | CREAD; pty_driver->init_termios.c_cflag = B38400 | CS8 | CREAD;
pty_driver->init_termios.c_lflag = 0; 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->flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_REAL_RAW;
pty_driver->other = pty_slave_driver; pty_driver->other = pty_slave_driver;
tty_set_operations(pty_driver, &pty_ops); 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->subtype = PTY_TYPE_SLAVE;
pty_slave_driver->init_termios = tty_std_termios; pty_slave_driver->init_termios = tty_std_termios;
pty_slave_driver->init_termios.c_cflag = B38400 | CS8 | CREAD; 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 | pty_slave_driver->flags = TTY_DRIVER_RESET_TERMIOS |
TTY_DRIVER_REAL_RAW; TTY_DRIVER_REAL_RAW;
pty_slave_driver->other = pty_driver; 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_oflag = 0;
ptm_driver->init_termios.c_cflag = B38400 | CS8 | CREAD; ptm_driver->init_termios.c_cflag = B38400 | CS8 | CREAD;
ptm_driver->init_termios.c_lflag = 0; 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 | ptm_driver->flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_REAL_RAW |
TTY_DRIVER_DYNAMIC_DEV | TTY_DRIVER_DEVPTS_MEM; TTY_DRIVER_DYNAMIC_DEV | TTY_DRIVER_DEVPTS_MEM;
ptm_driver->other = pts_driver; ptm_driver->other = pts_driver;
@ -381,6 +387,8 @@ static void __init unix98_pty_init(void)
pts_driver->subtype = PTY_TYPE_SLAVE; pts_driver->subtype = PTY_TYPE_SLAVE;
pts_driver->init_termios = tty_std_termios; pts_driver->init_termios = tty_std_termios;
pts_driver->init_termios.c_cflag = B38400 | CS8 | CREAD; 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 | pts_driver->flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_REAL_RAW |
TTY_DRIVER_DYNAMIC_DEV | TTY_DRIVER_DEVPTS_MEM; TTY_DRIVER_DYNAMIC_DEV | TTY_DRIVER_DEVPTS_MEM;
pts_driver->other = ptm_driver; pts_driver->other = ptm_driver;

View File

@ -1539,7 +1539,7 @@ static void rc_hangup(struct tty_struct * tty)
wake_up_interruptible(&port->open_wait); 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; struct riscom_port *port = (struct riscom_port *)tty->driver_data;
unsigned long flags; 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 = tty_std_termios;
riscom_driver->init_termios.c_cflag = riscom_driver->init_termios.c_cflag =
B9600 | CS8 | CREAD | HUPCL | CLOCAL; 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; riscom_driver->flags = TTY_DRIVER_REAL_RAW;
tty_set_operations(riscom_driver, &riscom_ops); tty_set_operations(riscom_driver, &riscom_ops);
if ((error = tty_register_driver(riscom_driver))) { if ((error = tty_register_driver(riscom_driver))) {

View 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. * user mode into the driver (exception handler). *info CD manipulation is spinlock protected.
*/ */
static void configure_r_port(struct r_port *info, static void configure_r_port(struct r_port *info,
struct termios *old_termios) struct ktermios *old_termios)
{ {
unsigned cflag; unsigned cflag;
unsigned long flags; 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, 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; struct r_port *info = (struct r_port *) tty->driver_data;
CHANNEL_t *cp; CHANNEL_t *cp;
@ -2214,7 +2214,7 @@ static int __init init_PCI(int boards_found)
int count = 0; int count = 0;
/* Work through the PCI device list, pulling out ours */ /* 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)) if (register_PCI(count + boards_found, dev))
count++; count++;
} }
@ -2436,6 +2436,8 @@ static int __init rp_init(void)
rocket_driver->init_termios = tty_std_termios; rocket_driver->init_termios = tty_std_termios;
rocket_driver->init_termios.c_cflag = rocket_driver->init_termios.c_cflag =
B9600 | CS8 | CREAD | HUPCL | CLOCAL; B9600 | CS8 | CREAD | HUPCL | CLOCAL;
rocket_driver->init_termios.c_ispeed = 9600;
rocket_driver->init_termios.c_ospeed = 9600;
#ifdef ROCKET_SOFT_FLOW #ifdef ROCKET_SOFT_FLOW
rocket_driver->flags |= TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; rocket_driver->flags |= TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV;
#endif #endif

View File

@ -695,6 +695,8 @@ static int a2232_init_drivers(void)
a2232_driver->init_termios = tty_std_termios; a2232_driver->init_termios = tty_std_termios;
a2232_driver->init_termios.c_cflag = a2232_driver->init_termios.c_cflag =
B9600 | CS8 | CREAD | HUPCL | CLOCAL; 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; a2232_driver->flags = TTY_DRIVER_REAL_RAW;
tty_set_operations(a2232_driver, &a2232_ops); tty_set_operations(a2232_driver, &a2232_ops);
if ((error = tty_register_driver(a2232_driver))) { if ((error = tty_register_driver(a2232_driver))) {

View File

@ -1695,7 +1695,7 @@ cy_ioctl(struct tty_struct *tty, struct file * file,
static void 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; struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;

View 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; struct specialix_port *port = (struct specialix_port *)tty->driver_data;
unsigned long flags; unsigned long flags;
@ -2400,6 +2400,8 @@ static int sx_init_drivers(void)
specialix_driver->init_termios = tty_std_termios; specialix_driver->init_termios = tty_std_termios;
specialix_driver->init_termios.c_cflag = specialix_driver->init_termios.c_cflag =
B9600 | CS8 | CREAD | HUPCL | CLOCAL; 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; specialix_driver->flags = TTY_DRIVER_REAL_RAW;
tty_set_operations(specialix_driver, &sx_ops); tty_set_operations(specialix_driver, &sx_ops);
@ -2475,7 +2477,7 @@ static int __init specialix_init(void)
i++; i++;
continue; continue;
} }
pdev = pci_find_device (PCI_VENDOR_ID_SPECIALIX, pdev = pci_get_device (PCI_VENDOR_ID_SPECIALIX,
PCI_DEVICE_ID_SPECIALIX_IO8, PCI_DEVICE_ID_SPECIALIX_IO8,
pdev); pdev);
if (!pdev) break; if (!pdev) break;
@ -2491,6 +2493,9 @@ static int __init specialix_init(void)
if (!sx_probe(&sx_board[i])) if (!sx_probe(&sx_board[i]))
found ++; found ++;
} }
/* May exit pci_get sequence early with lots of boards */
if (pdev != NULL)
pci_dev_put(pdev);
} }
#endif #endif

View File

@ -141,9 +141,11 @@ static struct tty_driver *stl_serial;
* with this termios initially. Basically all it defines is a raw port * with this termios initially. Basically all it defines is a raw port
* at 9600, 8 data bits, 1 stop bit. * 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_cflag = (B9600 | CS8 | CREAD | HUPCL | CLOCAL),
.c_cc = INIT_C_CC, .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_cd1400updatereg(struct stlport *portp, int regnr, int value);
static int stl_cd1400panelinit(struct stlbrd *brdp, struct stlpanel *panelp); 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_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 int stl_cd1400getsignals(struct stlport *portp);
static void stl_cd1400setsignals(struct stlport *portp, int dtr, int rts); static void stl_cd1400setsignals(struct stlport *portp, int dtr, int rts);
static void stl_cd1400ccrwait(struct stlport *portp); 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_sc26198getglobreg(struct stlport *portp, int regnr);
static int stl_sc26198panelinit(struct stlbrd *brdp, struct stlpanel *panelp); 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_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 int stl_sc26198getsignals(struct stlport *portp);
static void stl_sc26198setsignals(struct stlport *portp, int dtr, int rts); static void stl_sc26198setsignals(struct stlport *portp, int dtr, int rts);
static void stl_sc26198enablerxtx(struct stlport *portp, int rx, int tx); 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 { typedef struct uart {
int (*panelinit)(struct stlbrd *brdp, struct stlpanel *panelp); int (*panelinit)(struct stlbrd *brdp, struct stlpanel *panelp);
void (*portinit)(struct stlbrd *brdp, struct stlpanel *panelp, struct stlport *portp); 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); int (*getsignals)(struct stlport *portp);
void (*setsignals)(struct stlport *portp, int dtr, int rts); void (*setsignals)(struct stlport *portp, int dtr, int rts);
void (*enablerxtx)(struct stlport *portp, int rx, int tx); 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 stlport *portp;
struct termios *tiosp; struct ktermios *tiosp;
pr_debug("stl_settermios(tty=%p,old=%p)\n", tty, old); 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"); pr_debug("stl_findpcibrds()\n");
for (i = 0; (i < stl_nrpcibrds); i++) 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))) { stl_pcibrds[i].devid, dev))) {
/* /*
@ -2947,7 +2949,7 @@ static void stl_cd1400ccrwait(struct stlport *portp)
* settings. * settings.
*/ */
static void stl_cd1400setport(struct stlport *portp, struct termios *tiosp) static void stl_cd1400setport(struct stlport *portp, struct ktermios *tiosp)
{ {
struct stlbrd *brdp; struct stlbrd *brdp;
unsigned long flags; unsigned long flags;
@ -3924,7 +3926,7 @@ static void stl_sc26198portinit(struct stlbrd *brdp, struct stlpanel *panelp, st
* settings. * settings.
*/ */
static void stl_sc26198setport(struct stlport *portp, struct termios *tiosp) static void stl_sc26198setport(struct stlport *portp, struct ktermios *tiosp)
{ {
struct stlbrd *brdp; struct stlbrd *brdp;
unsigned long flags; unsigned long flags;

View File

@ -2263,6 +2263,8 @@ static int sx_init_drivers(void)
sx_driver->init_termios = tty_std_termios; sx_driver->init_termios = tty_std_termios;
sx_driver->init_termios.c_cflag = sx_driver->init_termios.c_cflag =
B9600 | CS8 | CREAD | HUPCL | CLOCAL; 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; sx_driver->flags = TTY_DRIVER_REAL_RAW;
tty_set_operations(sx_driver, &sx_ops); tty_set_operations(sx_driver, &sx_ops);

View File

@ -3060,7 +3060,7 @@ static int mgsl_ioctl_common(struct mgsl_struct *info, unsigned int cmd, unsigne
* *
* Return Value: None * 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; struct mgsl_struct *info = (struct mgsl_struct *)tty->driver_data;
unsigned long flags; unsigned long flags;
@ -4405,6 +4405,8 @@ static int mgsl_init_tty(void)
serial_driver->init_termios = tty_std_termios; serial_driver->init_termios = tty_std_termios;
serial_driver->init_termios.c_cflag = serial_driver->init_termios.c_cflag =
B9600 | CS8 | CREAD | HUPCL | CLOCAL; 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; serial_driver->flags = TTY_DRIVER_REAL_RAW;
tty_set_operations(serial_driver, &mgsl_ops); tty_set_operations(serial_driver, &mgsl_ops);
if ((rc = tty_register_driver(serial_driver)) < 0) { if ((rc = tty_register_driver(serial_driver)) < 0) {

View File

@ -151,7 +151,7 @@ static struct tty_driver *serial_driver;
static int open(struct tty_struct *tty, struct file * filp); static int open(struct tty_struct *tty, struct file * filp);
static void close(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 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 int write(struct tty_struct *tty, const unsigned char *buf, int count);
static void put_char(struct tty_struct *tty, unsigned char ch); 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); 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; struct slgt_info *info = tty->driver_data;
unsigned long flags; unsigned long flags;
@ -3546,6 +3546,8 @@ static int __init slgt_init(void)
serial_driver->init_termios = tty_std_termios; serial_driver->init_termios = tty_std_termios;
serial_driver->init_termios.c_cflag = serial_driver->init_termios.c_cflag =
B9600 | CS8 | CREAD | HUPCL | CLOCAL; 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; serial_driver->flags = TTY_DRIVER_REAL_RAW;
tty_set_operations(serial_driver, &ops); tty_set_operations(serial_driver, &ops);
if ((rc = tty_register_driver(serial_driver)) < 0) { if ((rc = tty_register_driver(serial_driver)) < 0) {

View File

@ -519,7 +519,7 @@ static struct tty_driver *serial_driver;
static int open(struct tty_struct *tty, struct file * filp); static int open(struct tty_struct *tty, struct file * filp);
static void close(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 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 int write(struct tty_struct *tty, const unsigned char *buf, int count);
static void put_char(struct tty_struct *tty, unsigned char ch); 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 /* 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; SLMP_INFO *info = (SLMP_INFO *)tty->driver_data;
unsigned long flags; unsigned long flags;
@ -4034,6 +4034,8 @@ static int __init synclinkmp_init(void)
serial_driver->init_termios = tty_std_termios; serial_driver->init_termios = tty_std_termios;
serial_driver->init_termios.c_cflag = serial_driver->init_termios.c_cflag =
B9600 | CS8 | CREAD | HUPCL | CLOCAL; 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; serial_driver->flags = TTY_DRIVER_REAL_RAW;
tty_set_operations(serial_driver, &ops); tty_set_operations(serial_driver, &ops);
if ((rc = tty_register_driver(serial_driver)) < 0) { if ((rc = tty_register_driver(serial_driver)) < 0) {

View File

@ -495,8 +495,8 @@ static int get_sgttyb(struct tty_struct * tty, struct sgttyb __user * sgttyb)
struct sgttyb tmp; struct sgttyb tmp;
mutex_lock(&tty->termios_mutex); mutex_lock(&tty->termios_mutex);
tmp.sg_ispeed = tty->c_ispeed; tmp.sg_ispeed = tty->termios->c_ispeed;
tmp.sg_ospeed = tty->c_ospeed; tmp.sg_ospeed = tty->termios->c_ospeed;
tmp.sg_erase = tty->termios->c_cc[VERASE]; tmp.sg_erase = tty->termios->c_cc[VERASE];
tmp.sg_kill = tty->termios->c_cc[VKILL]; tmp.sg_kill = tty->termios->c_cc[VKILL];
tmp.sg_flags = get_sgflags(tty); tmp.sg_flags = get_sgflags(tty);

View File

@ -153,6 +153,8 @@ static int scc_init_drivers(void)
scc_driver->init_termios = tty_std_termios; scc_driver->init_termios = tty_std_termios;
scc_driver->init_termios.c_cflag = scc_driver->init_termios.c_cflag =
B9600 | CS8 | CREAD | HUPCL | CLOCAL; 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; scc_driver->flags = TTY_DRIVER_REAL_RAW;
tty_set_operations(scc_driver, &scc_ops); tty_set_operations(scc_driver, &scc_ops);

View File

@ -1203,7 +1203,7 @@ static int capinc_tty_ioctl(struct tty_struct *tty, struct file * file,
return error; 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 #ifdef _DEBUG_TTYFUNCS
printk(KERN_DEBUG "capinc_tty_set_termios\n"); printk(KERN_DEBUG "capinc_tty_set_termios\n");

View 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 int if_chars_in_buffer(struct tty_struct *tty);
static void if_throttle(struct tty_struct *tty); static void if_throttle(struct tty_struct *tty);
static void if_unthrottle(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_tiocmget(struct tty_struct *tty, struct file *file);
static int if_tiocmset(struct tty_struct *tty, struct file *file, static int if_tiocmset(struct tty_struct *tty, struct file *file,
unsigned int set, unsigned int clear); unsigned int set, unsigned int clear);
@ -490,7 +490,7 @@ static void if_unthrottle(struct tty_struct *tty)
mutex_unlock(&cs->mutex); 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; struct cardstate *cs;
unsigned int iflag; unsigned int iflag;

View File

@ -1464,7 +1464,7 @@ isdn_tty_ioctl(struct tty_struct *tty, struct file *file,
} }
static void 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; modem_info *info = (modem_info *) tty->driver_data;

View File

@ -117,7 +117,7 @@ static int irtty_change_speed(struct sir_dev *dev, unsigned speed)
{ {
struct sirtty_cb *priv = dev->priv; struct sirtty_cb *priv = dev->priv;
struct tty_struct *tty; struct tty_struct *tty;
struct termios old_termios; struct ktermios old_termios;
int cflag; int cflag;
IRDA_ASSERT(priv != NULL, return -1;); 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) static inline void irtty_stop_receiver(struct tty_struct *tty, int stop)
{ {
struct termios old_termios; struct ktermios old_termios;
int cflag; int cflag;
lock_kernel(); lock_kernel();

View File

@ -60,8 +60,6 @@ static unsigned short int sclp_tty_chars_count;
struct tty_driver *sclp_tty_driver; struct tty_driver *sclp_tty_driver;
extern struct termios tty_std_termios;
static struct sclp_ioctls sclp_ioctls; static struct sclp_ioctls sclp_ioctls;
static struct sclp_ioctls sclp_ioctls_init = static struct sclp_ioctls sclp_ioctls_init =
{ {

View File

@ -1659,7 +1659,7 @@ tty3270_flush_buffer(struct tty_struct *tty)
* Check for visible/invisible input switches * Check for visible/invisible input switches
*/ */
static void 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; struct tty3270 *tp;
int new; int new;

View File

@ -214,8 +214,8 @@ static void serial21285_shutdown(struct uart_port *port)
} }
static void static void
serial21285_set_termios(struct uart_port *port, struct termios *termios, serial21285_set_termios(struct uart_port *port, struct ktermios *termios,
struct termios *old) struct ktermios *old)
{ {
unsigned long flags; unsigned long flags;
unsigned int baud, quot, h_lcr; unsigned int baud, quot, h_lcr;

View File

@ -1061,7 +1061,7 @@ static int rs_ioctl(struct tty_struct *tty, struct file * file,
return 0; 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; struct m68k_serial *info = (struct m68k_serial *)tty->driver_data;

View File

@ -1523,7 +1523,7 @@ static int rs_360_ioctl(struct tty_struct *tty, struct file * file,
/* FIX UP modem control here someday...... /* 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; ser_info_t *info = (ser_info_t *)tty->driver_data;

View File

@ -1763,8 +1763,8 @@ static unsigned int serial8250_get_divisor(struct uart_port *port, unsigned int
} }
static void static void
serial8250_set_termios(struct uart_port *port, struct termios *termios, serial8250_set_termios(struct uart_port *port, struct ktermios *termios,
struct termios *old) struct ktermios *old)
{ {
struct uart_8250_port *up = (struct uart_8250_port *)port; struct uart_8250_port *up = (struct uart_8250_port *)port;
unsigned char cval, fcr = 0; unsigned char cval, fcr = 0;

View File

@ -345,8 +345,8 @@ static void pl010_shutdown(struct uart_port *port)
} }
static void static void
pl010_set_termios(struct uart_port *port, struct termios *termios, pl010_set_termios(struct uart_port *port, struct ktermios *termios,
struct termios *old) struct ktermios *old)
{ {
unsigned int lcr_h, old_cr; unsigned int lcr_h, old_cr;
unsigned long flags; unsigned long flags;

View File

@ -412,8 +412,8 @@ static void pl011_shutdown(struct uart_port *port)
} }
static void static void
pl011_set_termios(struct uart_port *port, struct termios *termios, pl011_set_termios(struct uart_port *port, struct ktermios *termios,
struct termios *old) struct ktermios *old)
{ {
unsigned int lcr_h, old_cr; unsigned int lcr_h, old_cr;
unsigned long flags; unsigned long flags;

View File

@ -478,7 +478,7 @@ static void atmel_serial_pm(struct uart_port *port, unsigned int state, unsigned
/* /*
* Change the port parameters * 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 long flags;
unsigned int mode, imr, quot, baud; unsigned int mode, imr, quot, baud;

View File

@ -286,8 +286,8 @@ static void clps711xuart_shutdown(struct uart_port *port)
} }
static void static void
clps711xuart_set_termios(struct uart_port *port, struct termios *termios, clps711xuart_set_termios(struct uart_port *port, struct ktermios *termios,
struct termios *old) struct ktermios *old)
{ {
unsigned int ubrlcr, baud, quot; unsigned int ubrlcr, baud, quot;
unsigned long flags; unsigned long flags;

View File

@ -804,8 +804,8 @@ static struct e100_serial rs_table[] = {
#define NR_PORTS (sizeof(rs_table)/sizeof(struct e100_serial)) #define NR_PORTS (sizeof(rs_table)/sizeof(struct e100_serial))
static struct termios *serial_termios[NR_PORTS]; static struct ktermios *serial_termios[NR_PORTS];
static struct termios *serial_termios_locked[NR_PORTS]; static struct ktermios *serial_termios_locked[NR_PORTS];
#ifdef CONFIG_ETRAX_SERIAL_FAST_TIMER #ifdef CONFIG_ETRAX_SERIAL_FAST_TIMER
static struct fast_timer fast_timers[NR_PORTS]; static struct fast_timer fast_timers[NR_PORTS];
#endif #endif
@ -4223,7 +4223,7 @@ rs_ioctl(struct tty_struct *tty, struct file * file,
} }
static void 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; 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 = tty_std_termios;
driver->init_termios.c_cflag = driver->init_termios.c_cflag =
B115200 | CS8 | CREAD | HUPCL | CLOCAL; /* is normally B9600 default... */ 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->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV;
driver->termios = serial_termios; driver->termios = serial_termios;
driver->termios_locked = serial_termios_locked; driver->termios_locked = serial_termios_locked;

View File

@ -93,8 +93,8 @@ struct e100_serial {
struct work_struct work; struct work_struct work;
struct async_icount icount; /* error-statistics etc.*/ struct async_icount icount; /* error-statistics etc.*/
struct termios normal_termios; struct ktermios normal_termios;
struct termios callout_termios; struct ktermios callout_termios;
#ifdef DECLARE_WAITQUEUE #ifdef DECLARE_WAITQUEUE
wait_queue_head_t open_wait; wait_queue_head_t open_wait;
wait_queue_head_t close_wait; wait_queue_head_t close_wait;

View File

@ -461,8 +461,8 @@ static void dz_break_ctl(struct uart_port *uport, int break_state)
spin_unlock_irqrestore(&uport->lock, flags); spin_unlock_irqrestore(&uport->lock, flags);
} }
static void dz_set_termios(struct uart_port *uport, struct termios *termios, static void dz_set_termios(struct uart_port *uport, struct ktermios *termios,
struct termios *old_termios) struct ktermios *old_termios)
{ {
struct dz_port *dport = (struct dz_port *)uport; struct dz_port *dport = (struct dz_port *)uport;
unsigned long flags; unsigned long flags;

View File

@ -1087,8 +1087,8 @@ static void icom_close(struct uart_port *port)
} }
static void icom_set_termios(struct uart_port *port, static void icom_set_termios(struct uart_port *port,
struct termios *termios, struct ktermios *termios,
struct termios *old_termios) struct ktermios *old_termios)
{ {
int baud; int baud;
unsigned cflag, iflag; unsigned cflag, iflag;

View File

@ -459,8 +459,8 @@ static void imx_shutdown(struct uart_port *port)
} }
static void static void
imx_set_termios(struct uart_port *port, struct termios *termios, imx_set_termios(struct uart_port *port, struct ktermios *termios,
struct termios *old) struct ktermios *old)
{ {
struct imx_port *sport = (struct imx_port *)port; struct imx_port *sport = (struct imx_port *)port;
unsigned long flags; unsigned long flags;

View File

@ -950,7 +950,7 @@ static void transmit_chars(struct uart_port *the_port)
*/ */
static void static void
ioc3_change_speed(struct uart_port *the_port, 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); struct ioc3_port *port = get_ioc3_port(the_port);
unsigned int cflag; unsigned int cflag;
@ -1853,7 +1853,7 @@ static int ic3_startup(struct uart_port *the_port)
*/ */
static void static void
ic3_set_termios(struct uart_port *the_port, 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; unsigned long port_flags;

View File

@ -1681,7 +1681,7 @@ static void transmit_chars(struct uart_port *the_port)
*/ */
static void static void
ioc4_change_speed(struct uart_port *the_port, 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); struct ioc4_port *port = get_ioc4_port(the_port, 0);
int baud, bits; 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); ioc4_set_proto(port, the_port->mapbase);
/* set the speed of the serial port */ /* 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; return 0;
} }
@ -2570,7 +2570,7 @@ static int ic4_startup(struct uart_port *the_port)
*/ */
static void static void
ic4_set_termios(struct uart_port *the_port, 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; unsigned long port_flags;

View File

@ -840,8 +840,8 @@ ip22zilog_convert_to_zs(struct uart_ip22zilog_port *up, unsigned int cflag,
/* The port lock is not held. */ /* The port lock is not held. */
static void static void
ip22zilog_set_termios(struct uart_port *port, struct termios *termios, ip22zilog_set_termios(struct uart_port *port, struct ktermios *termios,
struct termios *old) struct ktermios *old)
{ {
struct uart_ip22zilog_port *up = (struct uart_ip22zilog_port *) port; struct uart_ip22zilog_port *up = (struct uart_ip22zilog_port *) port;
unsigned long flags; unsigned long flags;

View File

@ -142,7 +142,7 @@ static void jsm_tty_send_xchar(struct uart_port *port, char ch)
{ {
unsigned long lock_flags; unsigned long lock_flags;
struct jsm_channel *channel = (struct jsm_channel *)port; struct jsm_channel *channel = (struct jsm_channel *)port;
struct termios *termios; struct ktermios *termios;
spin_lock_irqsave(&port->lock, lock_flags); spin_lock_irqsave(&port->lock, lock_flags);
termios = port->info->tty->termios; termios = port->info->tty->termios;
@ -180,7 +180,7 @@ static int jsm_tty_open(struct uart_port *port)
struct jsm_board *brd; struct jsm_board *brd;
int rc = 0; int rc = 0;
struct jsm_channel *channel = (struct jsm_channel *)port; 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 */ /* Get board pointer from our array of majors we have allocated */
brd = channel->ch_bd; 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) static void jsm_tty_close(struct uart_port *port)
{ {
struct jsm_board *bd; struct jsm_board *bd;
struct termios *ts; struct ktermios *ts;
struct jsm_channel *channel = (struct jsm_channel *)port; struct jsm_channel *channel = (struct jsm_channel *)port;
jsm_printk(CLOSE, INFO, &channel->ch_bd->pci_dev, "start\n"); 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, static void jsm_tty_set_termios(struct uart_port *port,
struct termios *termios, struct ktermios *termios,
struct termios *old_termios) struct ktermios *old_termios)
{ {
unsigned long lock_flags; unsigned long lock_flags;
struct jsm_channel *channel = (struct jsm_channel *)port; struct jsm_channel *channel = (struct jsm_channel *)port;

View 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, 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; struct uart_sio_port *up = (struct uart_sio_port *)port;
unsigned char cval = 0; unsigned char cval = 0;

View File

@ -1132,7 +1132,7 @@ static int mcfrs_ioctl(struct tty_struct *tty, struct file * file,
return 0; 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; struct mcf_serial *info = (struct mcf_serial *)tty->driver_data;

View File

@ -270,8 +270,8 @@ mpc52xx_uart_shutdown(struct uart_port *port)
} }
static void static void
mpc52xx_uart_set_termios(struct uart_port *port, struct termios *new, mpc52xx_uart_set_termios(struct uart_port *port, struct ktermios *new,
struct termios *old) struct ktermios *old)
{ {
struct mpc52xx_psc __iomem *psc = PSC(port); struct mpc52xx_psc __iomem *psc = PSC(port);
unsigned long flags; unsigned long flags;

View File

@ -1440,8 +1440,8 @@ mpsc_shutdown(struct uart_port *port)
} }
static void static void
mpsc_set_termios(struct uart_port *port, struct termios *termios, mpsc_set_termios(struct uart_port *port, struct ktermios *termios,
struct termios *old) struct ktermios *old)
{ {
struct mpsc_port_info *pi = (struct mpsc_port_info *)port; struct mpsc_port_info *pi = (struct mpsc_port_info *)port;
u32 baud; u32 baud;

View File

@ -273,8 +273,8 @@ static void mux_shutdown(struct uart_port *port)
* The Serial Mux does not support this function. * The Serial Mux does not support this function.
*/ */
static void static void
mux_set_termios(struct uart_port *port, struct termios *termios, mux_set_termios(struct uart_port *port, struct ktermios *termios,
struct termios *old) struct ktermios *old)
{ {
} }

View File

@ -337,8 +337,8 @@ static void netx_shutdown(struct uart_port *port)
} }
static void static void
netx_set_termios(struct uart_port *port, struct termios *termios, netx_set_termios(struct uart_port *port, struct ktermios *termios,
struct termios *old) struct ktermios *old)
{ {
unsigned int baud, quot; unsigned int baud, quot;
unsigned char old_cr; unsigned char old_cr;

View 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, static void __pmz_set_termios(struct uart_port *port, struct ktermios *termios,
struct termios *old) struct ktermios *old)
{ {
struct uart_pmac_port *uap = to_pmz(port); struct uart_pmac_port *uap = to_pmz(port);
unsigned long baud; unsigned long baud;
@ -1273,7 +1273,7 @@ static void __pmz_set_termios(struct uart_port *port, struct termios *termios,
if (ZS_IS_ASLEEP(uap)) if (ZS_IS_ASLEEP(uap))
return; 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 /* 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 * 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. */ /* The port lock is not held. */
static void pmz_set_termios(struct uart_port *port, struct termios *termios, static void pmz_set_termios(struct uart_port *port, struct ktermios *termios,
struct termios *old) struct ktermios *old)
{ {
struct uart_pmac_port *uap = to_pmz(port); struct uart_pmac_port *uap = to_pmz(port);
unsigned long flags; unsigned long flags;

View File

@ -60,7 +60,7 @@ struct uart_pmac_port {
volatile struct dbdma_regs __iomem *tx_dma_regs; volatile struct dbdma_regs __iomem *tx_dma_regs;
volatile struct dbdma_regs __iomem *rx_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)) #define to_pmz(p) ((struct uart_pmac_port *)(p))

View File

@ -433,8 +433,8 @@ static void serial_pxa_shutdown(struct uart_port *port)
} }
static void static void
serial_pxa_set_termios(struct uart_port *port, struct termios *termios, serial_pxa_set_termios(struct uart_port *port, struct ktermios *termios,
struct termios *old) struct ktermios *old)
{ {
struct uart_pxa_port *up = (struct uart_pxa_port *)port; struct uart_pxa_port *up = (struct uart_pxa_port *)port;
unsigned char cval, fcr = 0; unsigned char cval, fcr = 0;

View 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, static void s3c24xx_serial_set_termios(struct uart_port *port,
struct termios *termios, struct ktermios *termios,
struct termios *old) struct ktermios *old)
{ {
struct s3c2410_uartcfg *cfg = s3c24xx_port_to_cfg(port); struct s3c2410_uartcfg *cfg = s3c24xx_port_to_cfg(port);
struct s3c24xx_uart_port *ourport = to_ourport(port); struct s3c24xx_uart_port *ourport = to_ourport(port);

View File

@ -408,8 +408,8 @@ static void sa1100_shutdown(struct uart_port *port)
} }
static void static void
sa1100_set_termios(struct uart_port *port, struct termios *termios, sa1100_set_termios(struct uart_port *port, struct ktermios *termios,
struct termios *old) struct ktermios *old)
{ {
struct sa1100_port *sport = (struct sa1100_port *)port; struct sa1100_port *sport = (struct sa1100_port *)port;
unsigned long flags; unsigned long flags;

View File

@ -65,7 +65,7 @@ static struct lock_class_key port_lock_key;
#define uart_console(port) (0) #define uart_console(port) (0)
#endif #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_wait_until_sent(struct tty_struct *tty, int timeout);
static void uart_change_pm(struct uart_state *state, int pm_state); 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. * we're actually going to be using.
*/ */
unsigned int unsigned int
uart_get_baud_rate(struct uart_port *port, struct termios *termios, uart_get_baud_rate(struct uart_port *port, struct ktermios *termios,
struct termios *old, unsigned int min, unsigned int max) struct ktermios *old, unsigned int min, unsigned int max)
{ {
unsigned int try, baud, altbaud = 38400; unsigned int try, baud, altbaud = 38400;
upf_t flags = port->flags & UPF_SPD_MASK; 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); EXPORT_SYMBOL(uart_get_divisor);
static void 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 tty_struct *tty = state->info->tty;
struct uart_port *port = state->port; struct uart_port *port = state->port;
struct termios *termios; struct ktermios *termios;
/* /*
* If we have no tty, termios, or the port does not exist, * 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; 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; struct uart_state *state = tty->driver_data;
unsigned long flags; unsigned long flags;
@ -1866,7 +1866,7 @@ int __init
uart_set_options(struct uart_port *port, struct console *co, uart_set_options(struct uart_port *port, struct console *co,
int baud, int parity, int bits, int flow) int baud, int parity, int bits, int flow)
{ {
struct termios termios; struct ktermios termios;
int i; int i;
/* /*
@ -1876,7 +1876,7 @@ uart_set_options(struct uart_port *port, struct console *co,
spin_lock_init(&port->lock); spin_lock_init(&port->lock);
lockdep_set_class(&port->lock, &port_lock_key); 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; 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. * Re-enable the console device after suspending.
*/ */
if (uart_console(port)) { if (uart_console(port)) {
struct termios termios; struct ktermios termios;
/* /*
* First try to use the console cflag setting. * 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; termios.c_cflag = port->cons->cflag;
/* /*
@ -2189,6 +2189,7 @@ int uart_register_driver(struct uart_driver *drv)
normal->subtype = SERIAL_TYPE_NORMAL; normal->subtype = SERIAL_TYPE_NORMAL;
normal->init_termios = tty_std_termios; normal->init_termios = tty_std_termios;
normal->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL; 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->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV;
normal->driver_state = drv; normal->driver_state = drv;
tty_set_operations(normal, &uart_ops); tty_set_operations(normal, &uart_ops);

View File

@ -348,8 +348,8 @@ static void lh7a40xuart_shutdown (struct uart_port* port)
} }
static void lh7a40xuart_set_termios (struct uart_port* port, static void lh7a40xuart_set_termios (struct uart_port* port,
struct termios* termios, struct ktermios* termios,
struct termios* old) struct ktermios* old)
{ {
unsigned int con; unsigned int con;
unsigned int inten; unsigned int inten;

View File

@ -556,8 +556,8 @@ static void serial_txx9_shutdown(struct uart_port *port)
} }
static void static void
serial_txx9_set_termios(struct uart_port *port, struct termios *termios, serial_txx9_set_termios(struct uart_port *port, struct ktermios *termios,
struct termios *old) struct ktermios *old)
{ {
struct uart_txx9_port *up = (struct uart_txx9_port *)port; struct uart_txx9_port *up = (struct uart_txx9_port *)port;
unsigned int cval, fcr = 0; unsigned int cval, fcr = 0;

View File

@ -943,8 +943,8 @@ static void sci_shutdown(struct uart_port *port)
s->disable(port); s->disable(port);
} }
static void sci_set_termios(struct uart_port *port, struct termios *termios, static void sci_set_termios(struct uart_port *port, struct ktermios *termios,
struct termios *old) struct ktermios *old)
{ {
struct sci_port *s = &sci_ports[port->line]; struct sci_port *s = &sci_ports[port->line];
unsigned int status, baud, smr_val; unsigned int status, baud, smr_val;

View File

@ -361,8 +361,8 @@ static int snp_startup(struct uart_port *port)
* *
*/ */
static void static void
snp_set_termios(struct uart_port *port, struct termios *termios, snp_set_termios(struct uart_port *port, struct ktermios *termios,
struct termios *old) struct ktermios *old)
{ {
} }

View File

@ -281,8 +281,8 @@ static void sunhv_shutdown(struct uart_port *port)
} }
/* port->lock is not held. */ /* port->lock is not held. */
static void sunhv_set_termios(struct uart_port *port, struct termios *termios, static void sunhv_set_termios(struct uart_port *port, struct ktermios *termios,
struct termios *old) struct ktermios *old)
{ {
unsigned int baud = uart_get_baud_rate(port, termios, old, 0, 4000000); unsigned int baud = uart_get_baud_rate(port, termios, old, 0, 4000000);
unsigned int quot = uart_get_divisor(port, baud); unsigned int quot = uart_get_divisor(port, baud);

View File

@ -786,8 +786,8 @@ static void sunsab_convert_to_sab(struct uart_sunsab_port *up, unsigned int cfla
} }
/* port->lock is not held. */ /* port->lock is not held. */
static void sunsab_set_termios(struct uart_port *port, struct termios *termios, static void sunsab_set_termios(struct uart_port *port, struct ktermios *termios,
struct termios *old) struct ktermios *old)
{ {
struct uart_sunsab_port *up = (struct uart_sunsab_port *) port; struct uart_sunsab_port *up = (struct uart_sunsab_port *) port;
unsigned long flags; unsigned long flags;

View File

@ -893,8 +893,8 @@ sunsu_change_speed(struct uart_port *port, unsigned int cflag,
} }
static void static void
sunsu_set_termios(struct uart_port *port, struct termios *termios, sunsu_set_termios(struct uart_port *port, struct ktermios *termios,
struct termios *old) struct ktermios *old)
{ {
unsigned int baud, quot; unsigned int baud, quot;

View File

@ -922,8 +922,8 @@ sunzilog_convert_to_zs(struct uart_sunzilog_port *up, unsigned int cflag,
/* The port lock is not held. */ /* The port lock is not held. */
static void static void
sunzilog_set_termios(struct uart_port *port, struct termios *termios, sunzilog_set_termios(struct uart_port *port, struct ktermios *termios,
struct termios *old) struct ktermios *old)
{ {
struct uart_sunzilog_port *up = (struct uart_sunzilog_port *) port; struct uart_sunzilog_port *up = (struct uart_sunzilog_port *) port;
unsigned long flags; unsigned long flags;

View File

@ -214,8 +214,8 @@ static void ulite_shutdown(struct uart_port *port)
free_irq(port->irq, port); free_irq(port->irq, port);
} }
static void ulite_set_termios(struct uart_port *port, struct termios *termios, static void ulite_set_termios(struct uart_port *port, struct ktermios *termios,
struct termios *old) struct ktermios *old)
{ {
unsigned long flags; unsigned long flags;
unsigned int baud; unsigned int baud;

View File

@ -404,8 +404,8 @@ static void v850e_uart_shutdown (struct uart_port *port)
} }
static void static void
v850e_uart_set_termios (struct uart_port *port, struct termios *termios, v850e_uart_set_termios (struct uart_port *port, struct ktermios *termios,
struct termios *old) struct ktermios *old)
{ {
unsigned cflags = termios->c_cflag; unsigned cflags = termios->c_cflag;

View File

@ -562,8 +562,8 @@ static void siu_shutdown(struct uart_port *port)
free_irq(port->irq, port); free_irq(port->irq, port);
} }
static void siu_set_termios(struct uart_port *port, struct termios *new, static void siu_set_termios(struct uart_port *port, struct ktermios *new,
struct termios *old) struct ktermios *old)
{ {
tcflag_t c_cflag, c_iflag; tcflag_t c_cflag, c_iflag;
uint8_t lcr, fcr, ier; uint8_t lcr, fcr, ier;

View File

@ -1238,7 +1238,7 @@ static int rs_ioctl(struct tty_struct *tty, struct file * file,
return 0; 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; struct dec_serial *info = (struct dec_serial *)tty->driver_data;
int was_stopped; int was_stopped;

View File

@ -677,10 +677,10 @@ static const __u8 acm_tty_size[] = {
5, 6, 7, 8 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 acm *acm = tty->driver_data;
struct termios *termios = tty->termios; struct ktermios *termios = tty->termios;
struct usb_cdc_line_coding newline; struct usb_cdc_line_coding newline;
int newctrl = acm->ctrlout; int newctrl = acm->ctrlout;

View 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 void gs_break(struct tty_struct *tty, int break_state);
static int gs_ioctl(struct tty_struct *tty, struct file *file, static int gs_ioctl(struct tty_struct *tty, struct file *file,
unsigned int cmd, unsigned long arg); 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(struct gs_dev *dev);
static int gs_send_packet(struct gs_dev *dev, char *packet, 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 * 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)
{ {
} }

View File

@ -156,7 +156,7 @@ cleanup:
} }
static void ark3116_set_termios(struct usb_serial_port *port, 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 usb_serial *serial = port->serial;
struct ark3116_private *priv = usb_get_serial_port_data(port); 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) 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; struct usb_serial *serial = port->serial;
char *buf; char *buf;
int result = 0; int result = 0;

View 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 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_close (struct usb_serial_port *port, struct file *filp);
static void belkin_sa_read_int_callback (struct urb *urb); 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 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 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); static int belkin_sa_tiocmget (struct usb_serial_port *port, struct file *file);
@ -333,7 +333,7 @@ exit:
__FUNCTION__, retval); __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 usb_serial *serial = port->serial;
struct belkin_sa_private *priv = usb_get_serial_port_data(port); struct belkin_sa_private *priv = usb_get_serial_port_data(port);

View File

@ -65,7 +65,7 @@ static int usb_console_setup(struct console *co, char *options)
struct usb_serial_port *port; struct usb_serial_port *port;
int retval = 0; int retval = 0;
struct tty_struct *tty; struct tty_struct *tty;
struct termios *termios; struct ktermios *termios;
dbg ("%s", __FUNCTION__); dbg ("%s", __FUNCTION__);

View 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_cleanup(struct usb_serial_port*);
static void cp2101_close(struct usb_serial_port*, struct file*); static void cp2101_close(struct usb_serial_port*, struct file*);
static void cp2101_get_termios(struct usb_serial_port*); 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_tiocmget (struct usb_serial_port *, struct file *);
static int cp2101_tiocmset (struct usb_serial_port *, struct file *, static int cp2101_tiocmset (struct usb_serial_port *, struct file *,
unsigned int, unsigned int); 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, static void cp2101_set_termios (struct usb_serial_port *port,
struct termios *old_termios) struct ktermios *old_termios)
{ {
unsigned int cflag, old_cflag=0; unsigned int cflag, old_cflag=0;
int baud=0, bits; int baud=0, bits;

View File

@ -143,7 +143,7 @@ struct cypress_private {
wait_queue_head_t delta_msr_wait; /* used for TIOCMIWAIT */ wait_queue_head_t delta_msr_wait; /* used for TIOCMIWAIT */
char prev_status, diff_status; /* 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 */ /* 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 */ /* 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 void cypress_send (struct usb_serial_port *port);
static int cypress_write_room (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 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_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_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); 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) { switch (cmd) {
case TIOCGSERIAL: 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 -EFAULT;
} }
return (0); return (0);
break; break;
case TIOCSSERIAL: 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; return -EFAULT;
} }
/* here we need to call cypress_set_termios to invoke the new settings */ /* 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, 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 cypress_private *priv = usb_get_serial_port_data(port);
struct tty_struct *tty; struct tty_struct *tty;

View 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_throttle (struct usb_serial_port *port);
static void digi_rx_unthrottle (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, 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 void digi_break_ctl( struct usb_serial_port *port, int break_state );
static int digi_ioctl( struct usb_serial_port *port, struct file *file, static int digi_ioctl( struct usb_serial_port *port, struct file *file,
unsigned int cmd, unsigned long arg ); 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, 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); 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; int ret;
unsigned char buf[32]; unsigned char buf[32];
struct digi_port *priv = usb_get_serial_port_data(port); struct digi_port *priv = usb_get_serial_port_data(port);
struct termios not_termios; struct ktermios not_termios;
unsigned long flags = 0; unsigned long flags = 0;

View File

@ -92,7 +92,7 @@ static int empeg_ioctl (struct usb_serial_port *port,
struct file * file, struct file * file,
unsigned int cmd, unsigned int cmd,
unsigned long arg); 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_write_bulk_callback (struct urb *urb);
static void empeg_read_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); dbg("%s - port %d", __FUNCTION__, port->number);

View 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_write_bulk_callback (struct urb *urb);
static void ftdi_read_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_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_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_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); 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 * 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 */ { /* ftdi_termios */
struct usb_device *dev = port->serial->dev; struct usb_device *dev = port->serial->dev;
unsigned int cflag = port->tty->termios->c_cflag; unsigned int cflag = port->tty->termios->c_cflag;

View 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 int edge_chars_in_buffer (struct usb_serial_port *port);
static void edge_throttle (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_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 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 void edge_break (struct usb_serial_port *port, int break_state);
static int edge_tiocmget (struct usb_serial_port *port, struct file *file); 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 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 calc_baud_rate_divisor (int baud_rate, int *divisor);
static int send_cmd_write_baud_rate (struct edgeport_port *edge_port, int baudRate); 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 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 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); 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 * SerialSetTermios
* this function is called by the tty driver when it wants to change the termios structure * 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 edgeport_port *edge_port = usb_get_serial_port_data(port);
struct tty_struct *tty = port->tty; 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 #ifndef CMSPAR
#define CMSPAR 0 #define CMSPAR 0
#endif #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; struct tty_struct *tty;
int baud; int baud;

View 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 void stop_read(struct edgeport_port *edge_port);
static int restart_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); static void edge_send(struct usb_serial_port *port);
/* circular buffer */ /* circular buffer */
@ -2361,7 +2361,7 @@ static int restart_read(struct edgeport_port *edge_port)
return status; 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 ump_uart_config *config;
struct tty_struct *tty; struct tty_struct *tty;
@ -2512,7 +2512,7 @@ static void change_port_settings (struct edgeport_port *edge_port, struct termio
return; 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 edgeport_port *edge_port = usb_get_serial_port_data(port);
struct tty_struct *tty = port->tty; struct tty_struct *tty = port->tty;

View 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 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_write_bulk_callback (struct urb *urb);
static void ir_read_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_baud = 0;
static u8 ir_xbof = 0; static u8 ir_xbof = 0;
@ -497,7 +497,7 @@ static void ir_read_bulk_callback (struct urb *urb)
return; 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 char *transfer_buffer;
unsigned int cflag; unsigned int cflag;

View 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, static void keyspan_set_termios (struct usb_serial_port *port,
struct termios *old_termios) struct ktermios *old_termios)
{ {
int baud_rate, device_port; int baud_rate, device_port;
struct keyspan_port_private *p_priv; struct keyspan_port_private *p_priv;

View File

@ -59,7 +59,7 @@ static int keyspan_ioctl (struct usb_serial_port *port,
unsigned int cmd, unsigned int cmd,
unsigned long arg); unsigned long arg);
static void keyspan_set_termios (struct usb_serial_port *port, 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, static void keyspan_break_ctl (struct usb_serial_port *port,
int break_state); int break_state);
static int keyspan_tiocmget (struct usb_serial_port *port, static int keyspan_tiocmget (struct usb_serial_port *port,

View 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, 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; struct usb_serial *serial = port->serial;
unsigned int cflag = port->tty->termios->c_cflag; unsigned int cflag = port->tty->termios->c_cflag;

View 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_read_bulk_callback (struct urb *urb);
static void klsi_105_set_termios (struct usb_serial_port *port, 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, static int klsi_105_ioctl (struct usb_serial_port *port,
struct file * file, struct file * file,
unsigned int cmd, unsigned int cmd,
@ -164,7 +164,7 @@ struct klsi_105_port_settings {
#define URB_TRANSFER_BUFFER_SIZE 64 #define URB_TRANSFER_BUFFER_SIZE 64
struct klsi_105_private { struct klsi_105_private {
struct klsi_105_port_settings cfg; struct klsi_105_port_settings cfg;
struct termios termios; struct ktermios termios;
unsigned long line_state; /* modem line settings */ unsigned long line_state; /* modem line settings */
/* write pool */ /* write pool */
struct urb * write_urb_pool[NUM_URBS]; 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, 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); struct klsi_105_private *priv = usb_get_serial_port_data(port);
unsigned int iflag = port->tty->termios->c_iflag; unsigned int iflag = port->tty->termios->c_iflag;

View File

@ -136,7 +136,7 @@ struct kobil_private {
int cur_pos; // index of the next char to send in buf int cur_pos; // index of the next char to send in buf
__u16 device_type; __u16 device_type;
int line_state; 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) { switch (cmd) {
case TCGETS: // 0x5401 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); dbg("%s - port %d Error in access_ok", __FUNCTION__, port->number);
return -EFAULT; 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)) &priv->internal_termios))
return -EFAULT; return -EFAULT;
return 0; 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); dbg("%s - port %d Error: port->tty->termios is NULL", __FUNCTION__, port->number);
return -ENOTTY; 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); dbg("%s - port %d Error in access_ok", __FUNCTION__, port->number);
return -EFAULT; return -EFAULT;
} }
if (user_termios_to_kernel_termios(&priv->internal_termios, if (user_termios_to_kernel_termios(&priv->internal_termios,
(struct termios __user *)arg)) (struct ktermios __user *)arg))
return -EFAULT; return -EFAULT;
settings = kzalloc(50, GFP_KERNEL); settings = kzalloc(50, GFP_KERNEL);

View File

@ -98,7 +98,7 @@ static void mct_u232_close (struct usb_serial_port *port,
struct file *filp); struct file *filp);
static void mct_u232_read_int_callback (struct urb *urb); static void mct_u232_read_int_callback (struct urb *urb);
static void mct_u232_set_termios (struct usb_serial_port *port, 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, static int mct_u232_ioctl (struct usb_serial_port *port,
struct file * file, struct file * file,
unsigned int cmd, unsigned int cmd,
@ -556,7 +556,7 @@ exit:
} /* mct_u232_read_int_callback */ } /* mct_u232_read_int_callback */
static void mct_u232_set_termios (struct usb_serial_port *port, 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 usb_serial *serial = port->serial;
struct mct_u232_private *priv = usb_get_serial_port_data(port); struct mct_u232_private *priv = usb_get_serial_port_data(port);

View File

@ -1014,7 +1014,7 @@ static int send_cmd_write_baud_rate(struct moschip_port *mos7720_port,
* the specified new settings. * the specified new settings.
*/ */
static void change_port_settings(struct moschip_port *mos7720_port, 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_port *port;
struct usb_serial *serial; struct usb_serial *serial;
@ -1203,7 +1203,7 @@ static void change_port_settings(struct moschip_port *mos7720_port,
* termios structure. * termios structure.
*/ */
static void mos7720_set_termios(struct usb_serial_port *port, static void mos7720_set_termios(struct usb_serial_port *port,
struct termios *old_termios) struct ktermios *old_termios)
{ {
int status; int status;
unsigned int cflag; unsigned int cflag;

View 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, static void mos7840_change_port_settings(struct moschip_port *mos7840_port,
struct termios *old_termios) struct ktermios *old_termios)
{ {
struct tty_struct *tty; struct tty_struct *tty;
int baud; 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, static void mos7840_set_termios(struct usb_serial_port *port,
struct termios *old_termios) struct ktermios *old_termios)
{ {
int status; int status;
unsigned int cflag; unsigned int cflag;

View 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, static int option_ioctl(struct usb_serial_port *port, struct file *file,
unsigned int cmd, unsigned long arg); unsigned int cmd, unsigned long arg);
static void option_set_termios(struct usb_serial_port *port, 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 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_tiocmget(struct usb_serial_port *port, struct file *file);
static int option_tiocmset(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, static void option_set_termios(struct usb_serial_port *port,
struct termios *old_termios) struct ktermios *old_termios)
{ {
dbg("%s", __FUNCTION__); dbg("%s", __FUNCTION__);

Some files were not shown because too many files have changed in this diff Show More