diff options
| author | Alexander Viro <viro@www.linux.org.uk> | 2003-06-11 07:41:28 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2003-06-11 07:41:28 -0700 |
| commit | 99a21edebbfd8c29e39ee7fcc8a1ffa423657290 (patch) | |
| tree | 4a82db683b56b0c84f9bc24d2db7083bf663a1f7 | |
| parent | e9f92fa1c214e52fa9afe50ac6e59be0fe20c6eb (diff) | |
[PATCH] tty_driver refcounting
killed the last remnants of callout stuff - we don't need to mess with
storing termios privately anymore.
68 files changed, 11 insertions, 523 deletions
diff --git a/arch/cris/drivers/serial.c b/arch/cris/drivers/serial.c index 88a233e90bcd..aba4337515ce 100644 --- a/arch/cris/drivers/serial.c +++ b/arch/cris/drivers/serial.c @@ -3006,12 +3006,6 @@ rs_close(struct tty_struct *tty, struct file * filp) } info->flags |= ASYNC_CLOSING; /* - * Save the termios structure, since this port may have - * separate termios for callout and dialin. - */ - if (info->flags & ASYNC_NORMAL_ACTIVE) - info->normal_termios = *tty->termios; - /* * Now we wait for the transmit buffer to clear; and we notify * the line discipline to only process XON/XOFF characters. */ @@ -3319,11 +3313,6 @@ rs_open(struct tty_struct *tty, struct file * filp) return retval; } - if ((info->count == 1) && (info->flags & ASYNC_SPLIT_TERMIOS)) { - *tty->termios = info->normal_termios; - change_speed(info); - } - #ifdef SERIAL_DEBUG_OPEN printk("rs_open ttyS%d successful...\n", info->line); #endif @@ -3511,7 +3500,6 @@ rs_init(void) info->blocked_open = 0; info->tqueue.routine = do_softint; info->tqueue.data = info; - info->normal_termios = serial_driver.init_termios; init_waitqueue_head(&info->open_wait); init_waitqueue_head(&info->close_wait); info->xmit.buf = NULL; diff --git a/arch/cris/drivers/serial.h b/arch/cris/drivers/serial.h index f5f7e116f3db..1994228fa102 100644 --- a/arch/cris/drivers/serial.h +++ b/arch/cris/drivers/serial.h @@ -84,7 +84,6 @@ struct e100_serial { struct tq_struct tqueue; struct async_icount icount; /* error-statistics etc.*/ - struct termios normal_termios; #ifdef DECLARE_WAITQUEUE wait_queue_head_t open_wait; wait_queue_head_t close_wait; diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c index 255a63952435..098033c9c3e1 100644 --- a/arch/ia64/hp/sim/simserial.c +++ b/arch/ia64/hp/sim/simserial.c @@ -930,11 +930,6 @@ static int rs_open(struct tty_struct *tty, struct file * filp) return retval; } - if ((info->state->count == 1) && - (info->flags & ASYNC_SPLIT_TERMIOS)) { - *tty->termios = info->state->normal_termios; - } - /* * figure out which console to use (should be one already) */ diff --git a/arch/mips/au1000/common/serial.c b/arch/mips/au1000/common/serial.c index 2c0a6757cfcb..a11fd68366a2 100644 --- a/arch/mips/au1000/common/serial.c +++ b/arch/mips/au1000/common/serial.c @@ -1922,12 +1922,6 @@ static void rs_close(struct tty_struct *tty, struct file * filp) info->flags |= ASYNC_CLOSING; restore_flags(flags); /* - * Save the termios structure, since this port may have - * separate termios for callout and dialin. - */ - if (info->flags & ASYNC_NORMAL_ACTIVE) - info->state->normal_termios = *tty->termios; - /* * Now we wait for the transmit buffer to clear; and we notify * the line discipline to only process XON/XOFF characters. */ @@ -2294,11 +2288,6 @@ static int rs_open(struct tty_struct *tty, struct file * filp) return retval; } - if ((info->state->count == 1) && - (info->flags & ASYNC_SPLIT_TERMIOS)) { - *tty->termios = info->state->normal_termios; - change_speed(info, 0); - } #ifdef CONFIG_AU1000_SERIAL_CONSOLE if (sercons.cflag && sercons.index == line) { tty->termios->c_cflag = sercons.cflag; @@ -2586,7 +2575,6 @@ static int __init rs_init(void) state->custom_divisor = 0; state->close_delay = 5*HZ/10; state->closing_wait = 30*HZ; - state->normal_termios = serial_driver.init_termios; state->icount.cts = state->icount.dsr = state->icount.rng = state->icount.dcd = 0; state->icount.rx = state->icount.tx = 0; diff --git a/arch/mips/baget/vacserial.c b/arch/mips/baget/vacserial.c index c03fd0046e90..89d47478093f 100644 --- a/arch/mips/baget/vacserial.c +++ b/arch/mips/baget/vacserial.c @@ -1680,12 +1680,6 @@ static void rs_close(struct tty_struct *tty, struct file * filp) } info->flags |= ASYNC_CLOSING; /* - * Save the termios structure, since this port may have - * separate termios for callout and dialin. - */ - if (info->flags & ASYNC_NORMAL_ACTIVE) - info->state->normal_termios = *tty->termios; - /* * Now we wait for the transmit buffer to clear; and we notify * the line discipline to only process XON/XOFF characters. */ @@ -2033,11 +2027,6 @@ static int rs_open(struct tty_struct *tty, struct file * filp) return retval; } - if ((info->state->count == 1) && - (info->flags & ASYNC_SPLIT_TERMIOS)) { - *tty->termios = info->state->normal_termios; - change_speed(info); - } #ifdef CONFIG_SERIAL_CONSOLE if (sercons.cflag && sercons.index == line) { tty->termios->c_cflag = sercons.cflag; @@ -2359,7 +2348,6 @@ int __init rs_init(void) state->custom_divisor = 0; state->close_delay = 5*HZ/10; state->closing_wait = 30*HZ; - state->normal_termios = serial_driver.init_termios; state->icount.cts = state->icount.dsr = state->icount.rng = state->icount.dcd = 0; state->icount.rx = state->icount.tx = 0; diff --git a/arch/ppc/4xx_io/serial_sicc.c b/arch/ppc/4xx_io/serial_sicc.c index 5254e52725fa..8f3c8c042685 100644 --- a/arch/ppc/4xx_io/serial_sicc.c +++ b/arch/ppc/4xx_io/serial_sicc.c @@ -265,7 +265,6 @@ struct SICC_state { unsigned int closing_wait; unsigned int custom_divisor; unsigned int flags; - struct termios normal_termios; int count; struct SICC_info *info; }; @@ -1469,12 +1468,6 @@ static void siccuart_close(struct tty_struct *tty, struct file *filp) info->flags |= ASYNC_CLOSING; restore_flags(flags); /* - * Save the termios structure, since this port may have - * separate termios for callout and dialin. - */ - if (info->flags & ASYNC_NORMAL_ACTIVE) - info->state->normal_termios = *tty->termios; - /* * Now we wait for the transmit buffer to clear; and we notify * the line discipline to only process XON/XOFF characters. */ @@ -1757,10 +1750,6 @@ static int siccuart_open(struct tty_struct *tty, struct file *filp) return retval; } - if ((info->state->count == 1) && - (info->flags & ASYNC_SPLIT_TERMIOS)) { - *tty->termios = info->state->normal_termios; - } #ifdef CONFIG_SERIAL_SICC_CONSOLE if (siccuart_cons.cflag && siccuart_cons.index == line) { tty->termios->c_cflag = siccuart_cons.cflag; @@ -1815,7 +1804,6 @@ int __init siccuart_init(void) state->line = i; state->close_delay = 5 * HZ / 10; state->closing_wait = 30 * HZ; - state->normal_termios = siccnormal_driver.init_termios; } diff --git a/arch/ppc/8260_io/uart.c b/arch/ppc/8260_io/uart.c index 3d1cc4460fd7..b6e5695c66e1 100644 --- a/arch/ppc/8260_io/uart.c +++ b/arch/ppc/8260_io/uart.c @@ -1654,12 +1654,6 @@ static void rs_8xx_close(struct tty_struct *tty, struct file * filp) } info->flags |= ASYNC_CLOSING; /* - * Save the termios structure, since this port may have - * separate termios for callout and dialin. - */ - if (info->flags & ASYNC_NORMAL_ACTIVE) - info->state->normal_termios = *tty->termios; - /* * Now we wait for the transmit buffer to clear; and we notify * the line discipline to only process XON/XOFF characters. */ @@ -1969,12 +1963,6 @@ static int rs_8xx_open(struct tty_struct *tty, struct file * filp) return retval; } - if ((info->state->count == 1) && - (info->flags & ASYNC_SPLIT_TERMIOS)) { - *tty->termios = info->state->normal_termios; - change_speed(info); - } - #ifdef SERIAL_DEBUG_OPEN printk("rs_open %s successful...", line); #endif @@ -2575,7 +2563,6 @@ int __init rs_8xx_init(void) state->custom_divisor = 0; state->close_delay = 5*HZ/10; state->closing_wait = 30*HZ; - state->normal_termios = serial_driver.init_termios; state->icount.cts = state->icount.dsr = state->icount.rng = state->icount.dcd = 0; state->icount.rx = state->icount.tx = 0; diff --git a/arch/ppc/8xx_io/uart.c b/arch/ppc/8xx_io/uart.c index 8529f80fb3bb..3afe68c4d759 100644 --- a/arch/ppc/8xx_io/uart.c +++ b/arch/ppc/8xx_io/uart.c @@ -1701,12 +1701,6 @@ static void rs_8xx_close(struct tty_struct *tty, struct file * filp) } info->flags |= ASYNC_CLOSING; /* - * Save the termios structure, since this port may have - * separate termios for callout and dialin. - */ - if (info->flags & ASYNC_NORMAL_ACTIVE) - info->state->normal_termios = *tty->termios; - /* * Now we wait for the transmit buffer to clear; and we notify * the line discipline to only process XON/XOFF characters. */ @@ -2029,12 +2023,6 @@ static int rs_8xx_open(struct tty_struct *tty, struct file * filp) return retval; } - if ((info->state->count == 1) && - (info->flags & ASYNC_SPLIT_TERMIOS)) { - *tty->termios = info->state->normal_termios; - change_speed(info); - } - #ifdef SERIAL_DEBUG_OPEN printk("rs_open %s successful...", tty->name); #endif @@ -2606,7 +2594,6 @@ int __init rs_8xx_init(void) state->custom_divisor = 0; state->close_delay = 5*HZ/10; state->closing_wait = 30*HZ; - state->normal_termios = serial_driver.init_termios; state->icount.cts = state->icount.dsr = state->icount.rng = state->icount.dcd = 0; state->icount.rx = state->icount.tx = 0; diff --git a/drivers/char/amiserial.c b/drivers/char/amiserial.c index 0204ebbe3c1b..d57552b02ed7 100644 --- a/drivers/char/amiserial.c +++ b/drivers/char/amiserial.c @@ -1554,12 +1554,6 @@ static void rs_close(struct tty_struct *tty, struct file * filp) } info->flags |= ASYNC_CLOSING; /* - * Save the termios structure, since this port may have - * separate termios for callout and dialin. - */ - if (info->flags & ASYNC_NORMAL_ACTIVE) - info->state->normal_termios = *tty->termios; - /* * Now we wait for the transmit buffer to clear; and we notify * the line discipline to only process XON/XOFF characters. */ @@ -1916,12 +1910,6 @@ static int rs_open(struct tty_struct *tty, struct file * filp) return retval; } - if ((info->state->count == 1) && - (info->flags & ASYNC_SPLIT_TERMIOS)) { - *tty->termios = info->state->normal_termios; - change_speed(info, 0); - } - #ifdef SERIAL_DEBUG_OPEN printk("rs_open %s successful...", tty->name); #endif @@ -2112,7 +2100,6 @@ static int __init rs_init(void) state->custom_divisor = 0; state->close_delay = 5*HZ/10; state->closing_wait = 30*HZ; - state->normal_termios = serial_driver.init_termios; state->icount.cts = state->icount.dsr = state->icount.rng = state->icount.dcd = 0; state->icount.rx = state->icount.tx = 0; diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c index 961ebf7207f9..88722fd7c7b5 100644 --- a/drivers/char/cyclades.c +++ b/drivers/char/cyclades.c @@ -2640,10 +2640,6 @@ cy_open(struct tty_struct *tty, struct file * filp) return retval; } - if ((info->count == 1) && (info->flags & ASYNC_SPLIT_TERMIOS)) { - *tty->termios = info->normal_termios; - } - #ifdef CY_DEBUG_OPEN printk(" cyc:cy_open done\n");/**/ #endif @@ -2788,12 +2784,6 @@ cy_close(struct tty_struct *tty, struct file *filp) return; } info->flags |= ASYNC_CLOSING; - /* - * Save the termios structure, since this port may have - * separate termios for callout and dialin. - */ - if (info->flags & ASYNC_NORMAL_ACTIVE) - info->normal_termios = *tty->termios; /* * Now we wait for the transmit buffer to clear; and we notify @@ -5563,8 +5553,6 @@ cy_init(void) info->default_threshold = 0; info->default_timeout = 0; INIT_WORK(&info->tqueue, do_softint, info); - info->normal_termios = - cy_serial_driver.init_termios; init_waitqueue_head(&info->open_wait); init_waitqueue_head(&info->close_wait); init_waitqueue_head(&info->shutdown_wait); @@ -5640,8 +5628,6 @@ cy_init(void) info->default_threshold = 0; info->default_timeout = 0; INIT_WORK(&info->tqueue, do_softint, info); - info->normal_termios = - cy_serial_driver.init_termios; init_waitqueue_head(&info->open_wait); init_waitqueue_head(&info->close_wait); init_waitqueue_head(&info->shutdown_wait); diff --git a/drivers/char/dz.c b/drivers/char/dz.c index 2ca810c3713f..8d14e56760d7 100644 --- a/drivers/char/dz.c +++ b/drivers/char/dz.c @@ -1090,12 +1090,6 @@ static void dz_close(struct tty_struct *tty, struct file *filp) } info->flags |= DZ_CLOSING; /* - * Save the termios structure, since this port may have - * separate termios for callout and dialin. - */ - if (info->flags & DZ_NORMAL_ACTIVE) - info->normal_termios = *tty->termios; - /* * Now we wait for the transmit buffer to clear; and we notify the line * discipline to only process XON/XOFF characters. */ @@ -1268,11 +1262,6 @@ static int dz_open (struct tty_struct *tty, struct file *filp) if (retval) return retval; - if ((info->count == 1) && (info->flags & DZ_SPLIT_TERMIOS)) { - *tty->termios = info->normal_termios; - change_speed(info); - } - return 0; } @@ -1351,7 +1340,6 @@ int __init dz_init(void) info->tqueue.data = info; info->tqueue_hangup.routine = do_serial_hangup; info->tqueue_hangup.data = info; - info->normal_termios = serial_driver.init_termios; init_waitqueue_head(&info->open_wait); init_waitqueue_head(&info->close_wait); diff --git a/drivers/char/dz.h b/drivers/char/dz.h index cd7d5413e4ef..70b5d4949fa8 100644 --- a/drivers/char/dz.h +++ b/drivers/char/dz.h @@ -156,7 +156,6 @@ struct dz_serial { struct tty_struct *tty; /* tty associated */ struct tq_struct tqueue; /* Queue for BH */ struct tq_struct tqueue_hangup; - struct termios normal_termios; wait_queue_head_t open_wait; wait_queue_head_t close_wait; diff --git a/drivers/char/epca.c b/drivers/char/epca.c index b613059c0d02..b6a8ef7f4ed5 100644 --- a/drivers/char/epca.c +++ b/drivers/char/epca.c @@ -542,14 +542,6 @@ static void pc_close(struct tty_struct * tty, struct file * filp) ch->asyncflags |= ASYNC_CLOSING; - /* ------------------------------------------------------------- - Save the termios structure, since this port may have - separate termios for callout and dialin. - --------------------------------------------------------------- */ - - if (ch->asyncflags & ASYNC_NORMAL_ACTIVE) - ch->normal_termios = *tty->termios; - tty->closing = 1; if (ch->asyncflags & ASYNC_INITIALIZED) @@ -1398,12 +1390,6 @@ static int pc_open(struct tty_struct *tty, struct file * filp) the tty->termios struct otherwise let pc_close handle it. -------------------------------------------------------------------- */ - /* Should this be here except for SPLIT termios ? */ - if (ch->count == 1) - { - *tty->termios = ch->normal_termios; - } - save_flags(flags); cli(); @@ -2081,7 +2067,6 @@ static void post_fep_init(unsigned int crd) ch->close_delay = 50; ch->count = 0; ch->blocked_open = 0; - ch->normal_termios = pc_driver.init_termios; init_waitqueue_head(&ch->open_wait); init_waitqueue_head(&ch->close_wait); ch->tmp_buf = kmalloc(ch->txbufsize,GFP_KERNEL); diff --git a/drivers/char/epca.h b/drivers/char/epca.h index 6997a38f9f39..ee1c98385e36 100644 --- a/drivers/char/epca.h +++ b/drivers/char/epca.h @@ -135,7 +135,6 @@ struct channel volatile struct board_chan *brdchan; struct digi_struct digiext; struct tty_struct *tty; - struct termios normal_termios; wait_queue_head_t open_wait; wait_queue_head_t close_wait; struct work_struct tqueue; diff --git a/drivers/char/esp.c b/drivers/char/esp.c index 276100b630de..4a629372e549 100644 --- a/drivers/char/esp.c +++ b/drivers/char/esp.c @@ -2065,12 +2065,6 @@ static void rs_close(struct tty_struct *tty, struct file * filp) } info->flags |= ASYNC_CLOSING; /* - * Save the termios structure, since this port may have - * separate termios for callout and dialin. - */ - if (info->flags & ASYNC_NORMAL_ACTIVE) - info->normal_termios = *tty->termios; - /* * Now we wait for the transmit buffer to clear; and we notify * the line discipline to only process XON/XOFF characters. */ @@ -2360,11 +2354,6 @@ static int esp_open(struct tty_struct *tty, struct file * filp) return retval; } - if ((info->count == 1) && (info->flags & ASYNC_SPLIT_TERMIOS)) { - *tty->termios = info->normal_termios; - change_speed(info); - } - #ifdef SERIAL_DEBUG_OPEN printk("esp_open %s successful...", tty->name); #endif @@ -2578,7 +2567,6 @@ int __init espserial_init(void) info->tqueue.data = info; info->tqueue_hangup.routine = do_serial_hangup; info->tqueue_hangup.data = info; - info->normal_termios = esp_driver.init_termios; info->config.rx_timeout = rx_timeout; info->config.flow_on = flow_on; info->config.flow_off = flow_off; diff --git a/drivers/char/generic_serial.c b/drivers/char/generic_serial.c index 8db4a6939690..4cff1066b35f 100644 --- a/drivers/char/generic_serial.c +++ b/drivers/char/generic_serial.c @@ -735,12 +735,6 @@ void gs_close(struct tty_struct * tty, struct file * filp) port->flags |= ASYNC_CLOSING; /* - * Save the termios structure, since this port may have - * separate termios for callout and dialin. - */ - if (port->flags & ASYNC_NORMAL_ACTIVE) - port->normal_termios = *tty->termios; - /* * Now we wait for the transmit buffer to clear; and we notify * the line discipline to only process XON/XOFF characters. */ diff --git a/drivers/char/ip2/i2lib.h b/drivers/char/ip2/i2lib.h index 5b19d22293d2..952e113ccd8a 100644 --- a/drivers/char/ip2/i2lib.h +++ b/drivers/char/ip2/i2lib.h @@ -101,8 +101,6 @@ typedef struct _i2ChanStr struct timer_list BookmarkTimer; // Used by i2DrainOutput wait_queue_head_t pBookmarkWait; // Used by i2DrainOutput - struct termios NormalTermios; - int BaudBase; int BaudDivisor; diff --git a/drivers/char/ip2main.c b/drivers/char/ip2main.c index 2c18c6366922..bff32a50aa54 100644 --- a/drivers/char/ip2main.c +++ b/drivers/char/ip2main.c @@ -1616,9 +1616,6 @@ noblock: /* first open - Assign termios structure to port */ if ( tty->count == 1 ) { i2QueueCommands(PTYPE_INLINE, pCh, 0, 2, CMD_CTSFL_DSAB, CMD_RTSFL_DSAB); - if ( pCh->flags & ASYNC_SPLIT_TERMIOS ) { - *tty->termios = pCh->NormalTermios; - } /* Now we must send the termios settings to the loadware */ set_params( pCh, NULL ); } @@ -1678,13 +1675,6 @@ ip2_close( PTTY tty, struct file *pFile ) } pCh->flags |= ASYNC_CLOSING; // last close actually - /* - * Save the termios structure, since this port may have separate termios - * for callout and dialin. - */ - if (pCh->flags & ASYNC_NORMAL_ACTIVE) - pCh->NormalTermios = *tty->termios; - tty->closing = 1; if (pCh->ClosingWaitTime != ASYNC_CLOSING_WAIT_NONE) { diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c index 3b4d310eef16..7d0795de79c3 100644 --- a/drivers/char/isicom.c +++ b/drivers/char/isicom.c @@ -1027,14 +1027,7 @@ static int isicom_open(struct tty_struct * tty, struct file * filp) #endif if ((error = block_til_ready(tty, filp, port))!=0) return error; - - if ((port->count == 1) && (port->flags & ASYNC_SPLIT_TERMIOS)) { - *tty->termios = port->normal_termios; - save_flags(flags); cli(); - isicom_config_port(port); - restore_flags(flags); - } - + #ifdef ISICOM_DEBUG printk(KERN_DEBUG "ISICOM: open end!!!.\n"); #endif @@ -1128,13 +1121,6 @@ static void isicom_close(struct tty_struct * tty, struct file * filp) return; } port->flags |= ASYNC_CLOSING; - /* - * save termios struct since callout and dialin termios may be - * different. - */ - if (port->flags & ASYNC_NORMAL_ACTIVE) - port->normal_termios = *tty->termios; - tty->closing = 1; if (port->closing_wait != ASYNC_CLOSING_WAIT_NONE) tty_wait_until_sent(tty, port->closing_wait); @@ -1827,7 +1813,6 @@ static int isicom_init(void) port->magic = ISICOM_MAGIC; port->card = &isi_card[card]; port->channel = channel; - port->normal_termios = isicom_normal.init_termios; port->close_delay = 50 * HZ/100; port->closing_wait = 3000 * HZ/100; port->hangup_tq.routine = do_isicom_hangup; diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c index 227397a40ebf..44c4740eb4df 100644 --- a/drivers/char/istallion.c +++ b/drivers/char/istallion.c @@ -1109,11 +1109,6 @@ static int stli_open(struct tty_struct *tty, struct file *filp) return(rc); } portp->flags |= ASYNC_NORMAL_ACTIVE; - - if ((portp->refcount == 1) && (portp->flags & ASYNC_SPLIT_TERMIOS)) { - *tty->termios = portp->normaltermios; - stli_setport(portp); - } return(0); } @@ -1148,9 +1143,6 @@ static void stli_close(struct tty_struct *tty, struct file *filp) portp->flags |= ASYNC_CLOSING; - if (portp->flags & ASYNC_NORMAL_ACTIVE) - portp->normaltermios = *tty->termios; - /* * May want to wait for data to drain before closing. The BUSY flag * keeps track of whether we are still transmitting or not. It is @@ -3321,7 +3313,6 @@ static inline int stli_initports(stlibrd_t *brdp) init_waitqueue_head(&portp->open_wait); init_waitqueue_head(&portp->close_wait); init_waitqueue_head(&portp->raw_wait); - portp->normaltermios = stli_deftermios; panelport++; if (panelport >= brdp->panels[panelnr]) { panelport = 0; diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c index 71a981f2c404..eacb2ce6d7fa 100644 --- a/drivers/char/moxa.c +++ b/drivers/char/moxa.c @@ -153,7 +153,7 @@ struct moxa_str { int asyncflags; unsigned long statusflags; struct tty_struct *tty; - struct termios normal_termios; + int cflag; wait_queue_head_t open_wait; wait_queue_head_t close_wait; struct work_struct tqueue; @@ -368,7 +368,7 @@ int moxa_init(void) ch->closing_wait = 30 * HZ; ch->count = 0; ch->blocked_open = 0; - ch->normal_termios = moxaDriver.init_termios; + ch->cflag = B9600 | CS8 | CREAD | CLOCAL | HUPCL; init_waitqueue_head(&ch->open_wait); init_waitqueue_head(&ch->close_wait); } @@ -551,9 +551,6 @@ static int moxa_open(struct tty_struct *tty, struct file *filp) ch->count++; tty->driver_data = ch; ch->tty = tty; - if (ch->count == 1 && (ch->asyncflags & ASYNC_SPLIT_TERMIOS)) { - *tty->termios = ch->normal_termios; - } if (!(ch->asyncflags & ASYNC_INITIALIZED)) { ch->statusflags = 0; set_tty_param(tty); @@ -613,12 +610,7 @@ static void moxa_close(struct tty_struct *tty, struct file *filp) } ch->asyncflags |= ASYNC_CLOSING; - /* - * Save the termios structure, since this port may have - * separate termios for callout and dialin. - */ - if (ch->asyncflags & ASYNC_NORMAL_ACTIVE) - ch->normal_termios = *tty->termios; + ch->cflag = *tty->termios->c_cflag; if (ch->asyncflags & ASYNC_INITIALIZED) { setup_empty_event(tty); tty_wait_until_sent(tty, 30 * HZ); /* 30 seconds timeout */ @@ -1680,7 +1672,7 @@ int MoxaDriverIoctl(unsigned int cmd, unsigned long arg, int port) } if (!moxaChannels[i].tty || !moxaChannels[i].tty->termios) - GMStatus[i].cflag = moxaChannels[i].normal_termios.c_cflag; + GMStatus[i].cflag = moxaChannels[i].cflag; else GMStatus[i].cflag = moxaChannels[i].tty->termios->c_cflag; } diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c index 46347b407ede..79dd742630ce 100644 --- a/drivers/char/mxser.c +++ b/drivers/char/mxser.c @@ -258,7 +258,7 @@ struct mxser_struct { int xmit_tail; int xmit_cnt; struct work_struct tqueue; - struct termios normal_termios; + int cflag; wait_queue_head_t open_wait; wait_queue_head_t close_wait; wait_queue_head_t delta_msr_wait; @@ -416,7 +416,7 @@ int mxser_initbrd(int board, struct mxser_hwconf *hwconf) info->close_delay = 5 * HZ / 10; info->closing_wait = 30 * HZ; INIT_WORK(&info->tqueue, mxser_do_softint, info); - info->normal_termios = mxvar_sdriver.init_termios; + info->cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL; init_waitqueue_head(&info->open_wait); init_waitqueue_head(&info->close_wait); init_waitqueue_head(&info->delta_msr_wait); @@ -714,15 +714,7 @@ static int mxser_open(struct tty_struct *tty, struct file *filp) if (retval) return (retval); - retval = mxser_block_til_ready(tty, filp, info); - if (retval) - return (retval); - - if ((info->count == 1) && (info->flags & ASYNC_SPLIT_TERMIOS)) { - *tty->termios = info->normal_termios; - mxser_change_speed(info, 0); - } - return (0); + return mxser_block_til_ready(tty, filp, info); } /* @@ -772,12 +764,7 @@ static void mxser_close(struct tty_struct *tty, struct file *filp) return; } info->flags |= ASYNC_CLOSING; - /* - * Save the termios structure, since this port may have - * separate termios for callout and dialin. - */ - if (info->flags & ASYNC_NORMAL_ACTIVE) - info->normal_termios = *tty->termios; + info->cflag = tty->termios->c_cflag; /* * Now we wait for the transmit buffer to clear; and we notify * the line discipline to only process XON/XOFF characters. @@ -1132,7 +1119,7 @@ static int mxser_ioctl_special(unsigned int cmd, unsigned long arg) continue; } if (!mxvar_table[i].tty || !mxvar_table[i].tty->termios) - GMStatus[i].cflag = mxvar_table[i].normal_termios.c_cflag; + GMStatus[i].cflag = mxvar_table[i].cflag; else GMStatus[i].cflag = mxvar_table[i].tty->termios->c_cflag; diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c index 2095bf5aa874..e3169bd16671 100644 --- a/drivers/char/pcmcia/synclink_cs.c +++ b/drivers/char/pcmcia/synclink_cs.c @@ -154,8 +154,6 @@ typedef struct _mgslpc_info { struct mgsl_icount icount; - struct termios normal_termios; - struct tty_struct *tty; int timeout; int x_char; /* xon/xoff character */ @@ -606,8 +604,6 @@ static dev_link_t *mgslpc_attach(void) mgslpc_add_device(info); - info->normal_termios = serial_driver.init_termios; - return link; } @@ -2571,12 +2567,6 @@ static void mgslpc_close(struct tty_struct *tty, struct file * filp) info->flags |= ASYNC_CLOSING; - /* Save the termios structure, since this port may have - * separate termios for callout and dialin. - */ - if (info->flags & ASYNC_NORMAL_ACTIVE) - info->normal_termios = *tty->termios; - /* set tty->closing to notify line discipline to * only process XON/XOFF characters. Only the N_TTY * discipline appears to use this (ppp does not). @@ -2882,12 +2872,6 @@ static int mgslpc_open(struct tty_struct *tty, struct file * filp) goto cleanup; } - if ((info->count == 1) && - info->flags & ASYNC_SPLIT_TERMIOS) { - *tty->termios = info->normal_termios; - mgslpc_change_params(info); - } - if (debug_level >= DEBUG_LEVEL_INFO) printk("%s(%d):mgslpc_open(%s) success\n", __FILE__,__LINE__, info->device_name); diff --git a/drivers/char/pcxx.c b/drivers/char/pcxx.c index 0e0fa85c0701..4904f0032544 100644 --- a/drivers/char/pcxx.c +++ b/drivers/char/pcxx.c @@ -471,16 +471,6 @@ int pcxe_open(struct tty_struct *tty, struct file * filp) } ch->asyncflags |= ASYNC_NORMAL_ACTIVE; - save_flags(flags); - cli(); - if((ch->count == 1) && (ch->asyncflags & ASYNC_SPLIT_TERMIOS)) { - *tty->termios = ch->normal_termios; - globalwinon(ch); - pcxxparam(tty,ch); - memoff(ch); - } - - restore_flags(flags); return 0; } @@ -553,12 +543,6 @@ static void pcxe_close(struct tty_struct * tty, struct file * filp) info->asyncflags |= ASYNC_CLOSING; - /* - * Save the termios structure, since this port may have - * separate termios for callout and dialin. - */ - if(info->asyncflags & ASYNC_NORMAL_ACTIVE) - info->normal_termios = *tty->termios; tty->closing = 1; if(info->asyncflags & ASYNC_INITIALIZED) { setup_empty_event(tty,info); @@ -1538,7 +1522,6 @@ load_fep: ch->close_delay = 50; ch->count = 0; ch->blocked_open = 0; - ch->normal_termios = pcxe_driver.init_termios; init_waitqueue_head(&ch->open_wait); init_waitqueue_head(&ch->close_wait); ch->asyncflags = 0; diff --git a/drivers/char/pcxx.h b/drivers/char/pcxx.h index bd680e495636..1e1bcccf42e6 100644 --- a/drivers/char/pcxx.h +++ b/drivers/char/pcxx.h @@ -123,7 +123,6 @@ struct channel { ulong c_cflag; ulong c_lflag; ulong c_oflag; - struct termios normal_termios; struct digi_struct digiext; ulong dummy[8]; }; diff --git a/drivers/char/rio/rio_linux.c b/drivers/char/rio/rio_linux.c index 2b765d43a1f9..5534ac86d063 100644 --- a/drivers/char/rio/rio_linux.c +++ b/drivers/char/rio/rio_linux.c @@ -967,7 +967,6 @@ static int rio_init_datastructures (void) } rio_dprintk (RIO_DEBUG_INIT, "initing port %d (%d)\n", i, port->Mapped); port->PortNum = i; - port->gs.normal_termios = tty_std_termios; port->gs.magic = RIO_MAGIC; port->gs.close_delay = HZ/2; port->gs.closing_wait = 30 * HZ; diff --git a/drivers/char/riscom8.c b/drivers/char/riscom8.c index 4c5b06baf0f5..5847b31482fe 100644 --- a/drivers/char/riscom8.c +++ b/drivers/char/riscom8.c @@ -1071,12 +1071,6 @@ static int rc_open(struct tty_struct * tty, struct file * filp) if ((error = block_til_ready(tty, filp, port))) return error; - if ((port->count == 1) && (port->flags & ASYNC_SPLIT_TERMIOS)) { - *tty->termios = port->normal_termios; - save_flags(flags); cli(); - rc_change_speed(bp, port); - restore_flags(flags); - } return 0; } @@ -1111,12 +1105,6 @@ static void rc_close(struct tty_struct * tty, struct file * filp) goto out; port->flags |= ASYNC_CLOSING; /* - * Save the termios structure, since this port may have - * separate termios for callout and dialin. - */ - if (port->flags & ASYNC_NORMAL_ACTIVE) - port->normal_termios = *tty->termios; - /* * Now we wait for the transmit buffer to clear; and we notify * the line discipline to only process XON/XOFF characters. */ @@ -1741,7 +1729,6 @@ static inline int rc_init_drivers(void) memset(rc_port, 0, sizeof(rc_port)); for (i = 0; i < RC_NPORT * RC_NBOARD; i++) { - rc_port[i].normal_termios = riscom_driver.init_termios; rc_port[i].magic = RISCOM8_MAGIC; rc_port[i].tqueue.routine = do_softint; rc_port[i].tqueue.data = &rc_port[i]; diff --git a/drivers/char/riscom8.h b/drivers/char/riscom8.h index 3a593c41539f..ca7cab0871e3 100644 --- a/drivers/char/riscom8.h +++ b/drivers/char/riscom8.h @@ -79,7 +79,6 @@ struct riscom_port { int xmit_head; int xmit_tail; int xmit_cnt; - struct termios normal_termios; wait_queue_head_t open_wait; wait_queue_head_t close_wait; struct tq_struct tqueue; diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c index 84fd5ce81d0d..9401c7925fbb 100644 --- a/drivers/char/rocket.c +++ b/drivers/char/rocket.c @@ -712,7 +712,6 @@ static void init_r_port(int board, int aiop, int chan, struct pci_dev *pci_dev) info->chan = chan; info->closing_wait = 3000; info->close_delay = 50; - info->normal_termios = rocket_driver.init_termios; init_waitqueue_head(&info->open_wait); init_waitqueue_head(&info->close_wait); info->flags &= ~ROCKET_MODE_MASK; @@ -1144,11 +1143,6 @@ static int rp_open(struct tty_struct *tty, struct file *filp) #endif return retval; } - - if ((info->count == 1) && (info->flags & ROCKET_SPLIT_TERMIOS)) { - *tty->termios = info->normal_termios; - configure_r_port(info, NULL); - } return 0; } @@ -1197,7 +1191,6 @@ static void rp_close(struct tty_struct *tty, struct file *filp) info->flags |= ROCKET_CLOSING; spin_unlock_irqrestore(&info->slock, flags); - info->normal_termios = *tty->termios; cp = &info->channel; /* diff --git a/drivers/char/rocket_int.h b/drivers/char/rocket_int.h index f444d800d321..f5c8d3ac1417 100644 --- a/drivers/char/rocket_int.h +++ b/drivers/char/rocket_int.h @@ -1229,8 +1229,6 @@ struct r_port { int ignore_status_mask; int read_status_mask; int cps; - struct termios normal_termios; - struct termios callout_termios; #ifdef DECLARE_WAITQUEUE wait_queue_head_t open_wait; diff --git a/drivers/char/ser_a2232.c b/drivers/char/ser_a2232.c index 35beb12a8a0f..6f56fa768244 100644 --- a/drivers/char/ser_a2232.c +++ b/drivers/char/ser_a2232.c @@ -466,11 +466,6 @@ static int a2232_open(struct tty_struct * tty, struct file * filp) return retval; } - if ((port->gs.count == 1) && (port->gs.flags & ASYNC_SPLIT_TERMIOS)){ - *tty->termios = port->gs.normal_termios; - a2232_set_real_termios (port); - } - a2232_enable_rx_interrupts(port); return 0; @@ -668,7 +663,6 @@ static void a2232_init_portstructs(void) port->which_a2232 = i/NUMLINES; port->which_port_on_a2232 = i%NUMLINES; port->disable_rx = port->throttle_input = port->cd_status = 0; - port->gs.normal_termios = tty_std_termios; port->gs.magic = A2232_MAGIC; port->gs.close_delay = HZ/2; port->gs.closing_wait = 30 * HZ; diff --git a/drivers/char/serial167.c b/drivers/char/serial167.c index e245b40d287e..059b73846fc1 100644 --- a/drivers/char/serial167.c +++ b/drivers/char/serial167.c @@ -1895,12 +1895,6 @@ cy_close(struct tty_struct * tty, struct file * filp) if (info->count) return; info->flags |= ASYNC_CLOSING; - /* - * Save the termios structure, since this port may have - * separate termios for callout and dialin. - */ - if (info->flags & ASYNC_NORMAL_ACTIVE) - info->normal_termios = *tty->termios; if (info->flags & ASYNC_INITIALIZED) tty_wait_until_sent(tty, 3000); /* 30 seconds timeout */ shutdown(info); @@ -2126,9 +2120,6 @@ cy_open(struct tty_struct *tty, struct file * filp) } } - if ((info->count == 1) && (info->flags & ASYNC_SPLIT_TERMIOS)) { - *tty->termios = info->normal_termios; - } /* * Start up serial port */ @@ -2426,7 +2417,6 @@ scrn[1] = '\0'; info->default_timeout = 0; info->tqueue.routine = do_softint; info->tqueue.data = info; - info->normal_termios = cy_serial_driver.init_termios; init_waitqueue_head(&info->open_wait); init_waitqueue_head(&info->close_wait); /* info->session */ diff --git a/drivers/char/serial_tx3912.c b/drivers/char/serial_tx3912.c index a4c2dd285ebb..24ecd8b1f334 100644 --- a/drivers/char/serial_tx3912.c +++ b/drivers/char/serial_tx3912.c @@ -589,11 +589,6 @@ static int rs_open (struct tty_struct * tty, struct file * filp) } /* tty->low_latency = 1; */ - if ((port->gs.count == 1) && (port->gs.flags & ASYNC_SPLIT_TERMIOS)) { - *tty->termios = port->gs.normal_termios; - rs_set_real_termios (port); - } - func_exit(); /* Jim */ @@ -747,7 +742,6 @@ static int rs_init_portstructs(void) port = rs_ports; for (i=0; i < TX3912_UART_NPORTS;i++) { rs_dprintk (TX3912_UART_DEBUG_INIT, "initing port %d\n", i); - port->gs.normal_termios = tty_std_termios; port->gs.magic = SERIAL_MAGIC; port->gs.close_delay = HZ/2; port->gs.closing_wait = 30 * HZ; diff --git a/drivers/char/sh-sci.c b/drivers/char/sh-sci.c index c5e123253820..3e17488eedf0 100644 --- a/drivers/char/sh-sci.c +++ b/drivers/char/sh-sci.c @@ -839,11 +839,6 @@ static int sci_open(struct tty_struct * tty, struct file * filp) goto failed_3; } - if ((port->gs.count == 1) && (port->gs.flags & ASYNC_SPLIT_TERMIOS)) { - *tty->termios = port->gs.normal_termios; - sci_set_real_termios(port); - } - #ifdef CONFIG_SERIAL_CONSOLE if (sercons.cflag && sercons.index == line) { tty->termios->c_cflag = sercons.cflag; @@ -1028,7 +1023,6 @@ static int sci_init_drivers(void) } for (port = &sci_ports[0]; port < &sci_ports[SCI_NPORTS]; port++) { - port->gs.normal_termios = sci_driver.init_termios; port->gs.magic = SCI_MAGIC; port->gs.close_delay = HZ/2; port->gs.closing_wait = 30 * HZ; diff --git a/drivers/char/specialix.c b/drivers/char/specialix.c index efcbd565a24c..4f17dc510649 100644 --- a/drivers/char/specialix.c +++ b/drivers/char/specialix.c @@ -1438,12 +1438,6 @@ static int sx_open(struct tty_struct * tty, struct file * filp) if ((error = block_til_ready(tty, filp, port))) return error; - if ((port->count == 1) && (port->flags & ASYNC_SPLIT_TERMIOS)) { - *tty->termios = port->normal_termios; - save_flags(flags); cli(); - sx_change_speed(bp, port); - restore_flags(flags); - } return 0; } @@ -1482,12 +1476,6 @@ static void sx_close(struct tty_struct * tty, struct file * filp) } port->flags |= ASYNC_CLOSING; /* - * Save the termios structure, since this port may have - * separate termios for callout and dialin. - */ - if (port->flags & ASYNC_NORMAL_ACTIVE) - port->normal_termios = *tty->termios; - /* * Now we wait for the transmit buffer to clear; and we notify * the line discipline to only process XON/XOFF characters. */ @@ -2212,7 +2200,6 @@ static int sx_init_drivers(void) } memset(sx_port, 0, sizeof(sx_port)); for (i = 0; i < SX_NPORT * SX_NBOARD; i++) { - sx_port[i].normal_termios = specialix_driver.init_termios; sx_port[i].magic = SPECIALIX_MAGIC; sx_port[i].tqueue.routine = do_softint; sx_port[i].tqueue.data = &sx_port[i]; diff --git a/drivers/char/specialix_io8.h b/drivers/char/specialix_io8.h index 66d4cbc974d0..1a2ff3a31c7c 100644 --- a/drivers/char/specialix_io8.h +++ b/drivers/char/specialix_io8.h @@ -118,7 +118,6 @@ struct specialix_port { int xmit_head; int xmit_tail; int xmit_cnt; - struct termios normal_termios; wait_queue_head_t open_wait; wait_queue_head_t close_wait; struct tq_struct tqueue; diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c index 87949af537c4..e11986efcc17 100644 --- a/drivers/char/stallion.c +++ b/drivers/char/stallion.c @@ -1077,10 +1077,6 @@ static int stl_open(struct tty_struct *tty, struct file *filp) } portp->flags |= ASYNC_NORMAL_ACTIVE; - if ((portp->refcount == 1) && (portp->flags & ASYNC_SPLIT_TERMIOS)) { - *tty->termios = portp->normaltermios; - stl_setport(portp, tty->termios); - } return(0); } @@ -1172,9 +1168,6 @@ static void stl_close(struct tty_struct *tty, struct file *filp) portp->refcount = 0; portp->flags |= ASYNC_CLOSING; - if (portp->flags & ASYNC_NORMAL_ACTIVE) - portp->normaltermios = *tty->termios; - /* * May want to wait for any data to drain before closing. The BUSY * flag keeps track of whether we are still sending or not - it is @@ -2286,7 +2279,6 @@ static int __init stl_initports(stlbrd_t *brdp, stlpanel_t *panelp) portp->baud_base = STL_BAUDBASE; portp->close_delay = STL_CLOSEDELAY; portp->closing_wait = 30 * HZ; - portp->normaltermios = stl_deftermios; INIT_WORK(&portp->tqueue, stl_offintr, portp); init_waitqueue_head(&portp->open_wait); init_waitqueue_head(&portp->close_wait); diff --git a/drivers/char/sx.c b/drivers/char/sx.c index a441c8789f04..d7f58eae48aa 100644 --- a/drivers/char/sx.c +++ b/drivers/char/sx.c @@ -1481,11 +1481,6 @@ static int sx_open (struct tty_struct * tty, struct file * filp) } /* tty->low_latency = 1; */ - if ((port->gs.count == 1) && (port->gs.flags & ASYNC_SPLIT_TERMIOS)) { - *tty->termios = port->gs.normal_termios; - sx_set_real_termios (port); - } - port->c_dcd = sx_get_CD (port); sx_dprintk (SX_DEBUG_OPEN, "at open: cd=%d\n", port->c_dcd); func_exit(); @@ -2296,7 +2291,6 @@ static int sx_init_portstructs (int nboards, int nports) board->ports = port; for (j=0; j < boards[i].nports;j++) { sx_dprintk (SX_DEBUG_INIT, "initing port %d\n", j); - port->gs.normal_termios = tty_std_termios; port->gs.magic = SX_MAGIC; port->gs.close_delay = HZ/2; port->gs.closing_wait = 30 * HZ; diff --git a/drivers/char/synclink.c b/drivers/char/synclink.c index 6b3ff1ebc5b3..7d391e35836f 100644 --- a/drivers/char/synclink.c +++ b/drivers/char/synclink.c @@ -199,8 +199,6 @@ struct mgsl_struct { struct mgsl_icount icount; - struct termios normal_termios; - struct tty_struct *tty; int timeout; int x_char; /* xon/xoff character */ @@ -3201,12 +3199,6 @@ static void mgsl_close(struct tty_struct *tty, struct file * filp) info->flags |= ASYNC_CLOSING; - /* Save the termios structure, since this port may have - * separate termios for callout and dialin. - */ - if (info->flags & ASYNC_NORMAL_ACTIVE) - info->normal_termios = *tty->termios; - /* set tty->closing to notify line discipline to * only process XON/XOFF characters. Only the N_TTY * discipline appears to use this (ppp does not). @@ -3563,12 +3555,6 @@ static int mgsl_open(struct tty_struct *tty, struct file * filp) goto cleanup; } - if ((info->count == 1) && - info->flags & ASYNC_SPLIT_TERMIOS) { - *tty->termios = info->normal_termios; - mgsl_change_params(info); - } - if (debug_level >= DEBUG_LEVEL_INFO) printk("%s(%d):mgsl_open(%s) success\n", __FILE__,__LINE__, info->device_name); @@ -4498,15 +4484,6 @@ int mgsl_init_tty() printk("%s %s, tty major#%d\n", driver_name, driver_version, serial_driver.major); - - /* Propagate these values to all device instances */ - - info = mgsl_device_list; - while(info){ - info->normal_termios = serial_driver.init_termios; - info = info->next_device; - } - return 0; } diff --git a/drivers/char/synclinkmp.c b/drivers/char/synclinkmp.c index d2664d901330..9f4c32932b92 100644 --- a/drivers/char/synclinkmp.c +++ b/drivers/char/synclinkmp.c @@ -166,8 +166,6 @@ typedef struct _synclinkmp_info { struct mgsl_icount icount; - struct termios normal_termios; - struct tty_struct *tty; int timeout; int x_char; /* xon/xoff character */ @@ -797,12 +795,6 @@ static int open(struct tty_struct *tty, struct file *filp) goto cleanup; } - if ((info->count == 1) && - info->flags & ASYNC_SPLIT_TERMIOS) { - *tty->termios = info->normal_termios; - change_params(info); - } - if (debug_level >= DEBUG_LEVEL_INFO) printk("%s(%d):%s open() success\n", __FILE__,__LINE__, info->device_name); @@ -854,12 +846,6 @@ static void close(struct tty_struct *tty, struct file *filp) info->flags |= ASYNC_CLOSING; - /* Save the termios structure, since this port may have - * separate termios for callout and dialin. - */ - if (info->flags & ASYNC_NORMAL_ACTIVE) - info->normal_termios = *tty->termios; - /* set tty->closing to notify line discipline to * only process XON/XOFF characters. Only the N_TTY * discipline appears to use this (ppp does not). @@ -3829,14 +3815,6 @@ static int __init synclinkmp_init(void) driver_name, driver_version, serial_driver.major); - /* Propagate these values to all device instances */ - - info = synclinkmp_device_list; - while(info){ - info->normal_termios = serial_driver.init_termios; - info = info->next_device; - } - return 0; } diff --git a/drivers/char/vme_scc.c b/drivers/char/vme_scc.c index 50610d90e9bb..d73f894162cc 100644 --- a/drivers/char/vme_scc.c +++ b/drivers/char/vme_scc.c @@ -176,7 +176,6 @@ static void scc_init_portstructs(void) for (i = 0; i < 2; i++) { port = scc_ports + i; - port->gs.normal_termios = tty_std_termios; port->gs.magic = SCC_MAGIC; port->gs.close_delay = HZ/2; port->gs.closing_wait = 30 * HZ; @@ -914,11 +913,6 @@ static int scc_open (struct tty_struct * tty, struct file * filp) return retval; } - if ((port->gs.count == 1) && (port->gs.flags & ASYNC_SPLIT_TERMIOS)) { - *tty->termios = port->gs.normal_termios; - scc_set_real_termios (port); - } - port->c_dcd = scc_get_CD (port); scc_enable_rx_interrupts(port); diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c index 0c2565a92ecc..d0ae16cc618f 100644 --- a/drivers/isdn/i4l/isdn_tty.c +++ b/drivers/isdn/i4l/isdn_tty.c @@ -1762,10 +1762,6 @@ isdn_tty_open(struct tty_struct *tty, struct file *filp) #endif return retval; } - if ((info->count == 1) && (info->flags & ISDN_ASYNC_SPLIT_TERMIOS)) { - *tty->termios = info->normal_termios; - isdn_tty_change_speed(info); - } #ifdef ISDN_DEBUG_MODEM_OPEN printk(KERN_DEBUG "isdn_tty_open ttyi%d successful...\n", info->line); #endif @@ -1820,13 +1816,6 @@ isdn_tty_close(struct tty_struct *tty, struct file *filp) goto out; } info->flags |= ISDN_ASYNC_CLOSING; - /* - * Save the termios structure, since this port may have - * separate termios for callout and dialin. - */ - if (info->flags & ISDN_ASYNC_NORMAL_ACTIVE) - info->normal_termios = *tty->termios; - tty->closing = 1; /* * At this point we stop accepting input. To do this, we @@ -2062,7 +2051,6 @@ isdn_tty_init(void) info->x_char = 0; info->count = 0; info->blocked_open = 0; - info->normal_termios = m->tty_modem.init_termios; init_waitqueue_head(&info->open_wait); init_waitqueue_head(&info->close_wait); info->isdn_slot = NULL; diff --git a/drivers/macintosh/macserial.c b/drivers/macintosh/macserial.c index ee19e7240c36..fcf261c62b82 100644 --- a/drivers/macintosh/macserial.c +++ b/drivers/macintosh/macserial.c @@ -1954,12 +1954,6 @@ static void rs_close(struct tty_struct *tty, struct file * filp) } info->flags |= ZILOG_CLOSING; /* - * Save the termios structure, since this port may have - * separate termios for callout and dialin. - */ - if (info->flags & ZILOG_NORMAL_ACTIVE) - info->normal_termios = *tty->termios; - /* * Now we wait for the transmit buffer to clear; and we notify * the line discipline to only process XON/XOFF characters. */ @@ -2253,10 +2247,6 @@ static int rs_open(struct tty_struct *tty, struct file * filp) return retval; } - if ((info->count == 1) && (info->flags & ZILOG_SPLIT_TERMIOS)) { - *tty->termios = info->normal_termios; - change_speed(info, 0); - } #ifdef CONFIG_SERIAL_CONSOLE if (sercons.cflag && sercons.index == line) { tty->termios->c_cflag = sercons.cflag; @@ -2646,7 +2636,6 @@ no_dma: info->blocked_open = 0; INIT_WORK(&info->tqueue, do_softint, info); spin_lock_init(&info->lock); - info->normal_termios = serial_driver.init_termios; init_waitqueue_head(&info->open_wait); init_waitqueue_head(&info->close_wait); info->timeout = HZ; diff --git a/drivers/macintosh/macserial.h b/drivers/macintosh/macserial.h index 4ac49ab6fbec..bade11a7a5c3 100644 --- a/drivers/macintosh/macserial.h +++ b/drivers/macintosh/macserial.h @@ -161,7 +161,6 @@ struct mac_serial { int xmit_tail; int xmit_cnt; struct work_struct tqueue; - struct termios normal_termios; wait_queue_head_t open_wait; wait_queue_head_t close_wait; diff --git a/drivers/net/wan/sdla_chdlc.c b/drivers/net/wan/sdla_chdlc.c index 4d23fa9c8af0..c2e8f65c8fb0 100644 --- a/drivers/net/wan/sdla_chdlc.c +++ b/drivers/net/wan/sdla_chdlc.c @@ -4466,7 +4466,6 @@ int wanpipe_tty_init(sdla_t *card) state->custom_divisor = 0; state->close_delay = 5*HZ/10; state->closing_wait = 30*HZ; - state->normal_termios = serial_driver.init_termios; state->icount.cts = state->icount.dsr = state->icount.rng = state->icount.dcd = 0; state->icount.rx = state->icount.tx = 0; diff --git a/drivers/net/wan/z85230.h b/drivers/net/wan/z85230.h index 3b895ab0345f..77e53208045f 100644 --- a/drivers/net/wan/z85230.h +++ b/drivers/net/wan/z85230.h @@ -333,7 +333,6 @@ struct z8530_channel struct tty_struct *tty; /* Attached terminal */ int line; /* Minor number */ - struct termios normal_termios; /* Terminal settings */ wait_queue_head_t open_wait; /* Tasks waiting to open */ wait_queue_head_t close_wait; /* and for close to end */ unsigned long event; /* Pending events */ diff --git a/drivers/s390/net/ctctty.c b/drivers/s390/net/ctctty.c index 604e944d301f..f3fc20f6a6d7 100644 --- a/drivers/s390/net/ctctty.c +++ b/drivers/s390/net/ctctty.c @@ -61,7 +61,6 @@ typedef struct { struct sk_buff_head tx_queue; /* transmit queue */ struct sk_buff_head rx_queue; /* receive queue */ struct tty_struct *tty; /* Pointer to corresponding tty */ - struct termios normal_termios; /* For saving termios structs */ wait_queue_head_t open_wait; wait_queue_head_t close_wait; struct semaphore write_sem; @@ -994,10 +993,6 @@ ctc_tty_open(struct tty_struct *tty, struct file *filp) #endif return retval; } - if ((info->count == 1) && (info->flags & CTC_ASYNC_SPLIT_TERMIOS)) { - *tty->termios = info->normal_termios; - ctc_tty_change_speed(info); - } #ifdef CTC_DEBUG_MODEM_OPEN printk(KERN_DEBUG "ctc_tty_open %s successful...\n", tty->name); #endif @@ -1046,13 +1041,6 @@ ctc_tty_close(struct tty_struct *tty, struct file *filp) return; } info->flags |= CTC_ASYNC_CLOSING; - /* - * Save the termios structure, since this port may have - * separate termios for callout and dialin. - */ - if (info->flags & CTC_ASYNC_NORMAL_ACTIVE) - info->normal_termios = *tty->termios; - tty->closing = 1; /* * At this point we stop accepting input. To do this, we @@ -1200,7 +1188,6 @@ ctc_tty_init(void) info->tty = 0; info->count = 0; info->blocked_open = 0; - info->normal_termios = device->init_termios; init_waitqueue_head(&info->open_wait); init_waitqueue_head(&info->close_wait); skb_queue_head_init(&info->tx_queue); diff --git a/drivers/sbus/char/aurora.c b/drivers/sbus/char/aurora.c index 87e6a443c929..7cab4ad75bee 100644 --- a/drivers/sbus/char/aurora.c +++ b/drivers/sbus/char/aurora.c @@ -1440,13 +1440,6 @@ static int aurora_open(struct tty_struct * tty, struct file * filp) return error; } - if ((port->count == 1) && (port->flags & ASYNC_SPLIT_TERMIOS)) { - *tty->termios = port->normal_termios; - save_flags(flags); cli(); - aurora_change_speed(bp, port); - restore_flags(flags); - } - #ifdef AURORA_DEBUG printk("aurora_open: end\n"); #endif @@ -1495,12 +1488,6 @@ static void aurora_close(struct tty_struct * tty, struct file * filp) } port->flags |= ASYNC_CLOSING; - /* Save the termios structure, since this port may have - * separate termios for callout and dialin. - */ - if (port->flags & ASYNC_NORMAL_ACTIVE) - port->normal_termios = *tty->termios; - /* Now we wait for the transmit buffer to clear; and we notify * the line discipline to only process XON/XOFF characters. */ @@ -2319,7 +2306,6 @@ static int aurora_init_drivers(void) memset(aurora_port, 0, sizeof(aurora_port)); for (i = 0; i < AURORA_TNPORTS; i++) { - aurora_port[i].normal_termios = aurora_driver.init_termios; aurora_port[i].magic = AURORA_MAGIC; aurora_port[i].tqueue.routine = do_softint; aurora_port[i].tqueue.data = &aurora_port[i]; diff --git a/drivers/sbus/char/aurora.h b/drivers/sbus/char/aurora.h index 8c263514d087..b8b5476d9860 100644 --- a/drivers/sbus/char/aurora.h +++ b/drivers/sbus/char/aurora.h @@ -252,7 +252,6 @@ struct Aurora_port { int xmit_head; int xmit_tail; int xmit_cnt; - struct termios normal_termios; wait_queue_head_t open_wait; wait_queue_head_t close_wait; struct tq_struct tqueue; diff --git a/drivers/serial/68328serial.c b/drivers/serial/68328serial.c index 4109c7d89e4e..670b6f44bd8f 100644 --- a/drivers/serial/68328serial.c +++ b/drivers/serial/68328serial.c @@ -1167,12 +1167,6 @@ static void rs_close(struct tty_struct *tty, struct file * filp) } info->flags |= S_CLOSING; /* - * Save the termios structure, since this port may have - * separate termios for callout and dialin. - */ - if (info->flags & S_NORMAL_ACTIVE) - info->normal_termios = *tty->termios; - /* * Now we wait for the transmit buffer to clear; and we notify * the line discipline to only process XON/XOFF characters. */ @@ -1358,17 +1352,7 @@ int rs_open(struct tty_struct *tty, struct file * filp) if (retval) return retval; - retval = block_til_ready(tty, filp, info); - if (retval) { - return retval; - } - - if ((info->count == 1) && (info->flags & S_SPLIT_TERMIOS)) { - *tty->termios = info->normal_termios; - change_speed(info); - } - - return 0; + return block_til_ready(tty, filp, info); } /* Finally, routines used to initialize the serial driver. */ @@ -1493,7 +1477,6 @@ rs68328_init(void) info->blocked_open = 0; INIT_WORK(&info->tqueue, do_softint, info); INIT_WORK(&info->tqueue_hangup, do_serial_hangup, info); - info->normal_termios = serial_driver.init_termios; init_waitqueue_head(&info->open_wait); init_waitqueue_head(&info->close_wait); info->line = i; diff --git a/drivers/serial/68328serial.h b/drivers/serial/68328serial.h index 7bac1e5627d1..978f8a609f3d 100644 --- a/drivers/serial/68328serial.h +++ b/drivers/serial/68328serial.h @@ -161,7 +161,6 @@ struct m68k_serial { int xmit_cnt; struct work_struct tqueue; struct work_struct tqueue_hangup; - struct termios normal_termios; wait_queue_head_t open_wait; wait_queue_head_t close_wait; }; diff --git a/drivers/serial/68360serial.c b/drivers/serial/68360serial.c index 60fffc37a081..cf6e8519053f 100644 --- a/drivers/serial/68360serial.c +++ b/drivers/serial/68360serial.c @@ -162,7 +162,6 @@ struct serial_state { unsigned short close_delay; unsigned short closing_wait; /* time to wait before closing */ struct async_icount_24 icount; - struct termios normal_termios; int io_type; struct async_struct *info; }; @@ -1704,12 +1703,6 @@ static void rs_360_close(struct tty_struct *tty, struct file * filp) } info->flags |= ASYNC_CLOSING; /* - * Save the termios structure, since this port may have - * separate termios for callout and dialin. - */ - if (info->flags & ASYNC_NORMAL_ACTIVE) - info->state->normal_termios = *tty->termios; - /* * Now we wait for the transmit buffer to clear; and we notify * the line discipline to only process XON/XOFF characters. */ @@ -2031,12 +2024,6 @@ static int rs_360_open(struct tty_struct *tty, struct file * filp) return retval; } - if ((info->state->count == 1) && - (info->flags & ASYNC_SPLIT_TERMIOS)) { - *tty->termios = info->state->normal_termios; - change_speed(info); - } - #ifdef SERIAL_DEBUG_OPEN printk("rs_open %s successful...", tty->name); #endif @@ -2624,7 +2611,6 @@ int rs_360_init(void) state->custom_divisor = 0; state->close_delay = 5*HZ/10; state->closing_wait = 30*HZ; - state->normal_termios = serial_driver.init_termios; state->icount.cts = state->icount.dsr = state->icount.rng = state->icount.dcd = 0; state->icount.rx = state->icount.tx = 0; diff --git a/drivers/serial/mcfserial.c b/drivers/serial/mcfserial.c index 5f6d41f1bfd3..e3c37e991b37 100644 --- a/drivers/serial/mcfserial.c +++ b/drivers/serial/mcfserial.c @@ -1185,13 +1185,6 @@ static void mcfrs_close(struct tty_struct *tty, struct file * filp) info->flags |= ASYNC_CLOSING; /* - * Save the termios structure, since this port may have - * separate termios for callout and dialin. - */ - if (info->flags & ASYNC_NORMAL_ACTIVE) - info->normal_termios = *tty->termios; - - /* * Now we wait for the transmit buffer to clear; and we notify * the line discipline to only process XON/XOFF characters. */ @@ -1403,11 +1396,6 @@ int mcfrs_open(struct tty_struct *tty, struct file * filp) return retval; } - if ((info->count == 1) && (info->flags & ASYNC_SPLIT_TERMIOS)) { - *tty->termios = info->normal_termios; - mcfrs_change_speed(info); - } - #ifdef SERIAL_DEBUG_OPEN printk("mcfrs_open %s successful...\n", tty->name); #endif @@ -1632,7 +1620,6 @@ mcfrs_init(void) info->blocked_open = 0; INIT_WORK(&info->tqueue, mcfrs_offintr, info); INIT_WORK(&info->tqueue_hangup, do_serial_hangup, info); - info->normal_termios = mcfrs_serial_driver.init_termios; init_waitqueue_head(&info->open_wait); init_waitqueue_head(&info->close_wait); diff --git a/drivers/serial/mcfserial.h b/drivers/serial/mcfserial.h index 2ec02e9a99f5..ef3fb8321333 100644 --- a/drivers/serial/mcfserial.h +++ b/drivers/serial/mcfserial.h @@ -65,7 +65,6 @@ struct mcf_serial { struct mcf_stats stats; struct work_struct tqueue; struct work_struct tqueue_hangup; - struct termios normal_termios; wait_queue_head_t open_wait; wait_queue_head_t close_wait; diff --git a/drivers/sgi/char/sgiserial.c b/drivers/sgi/char/sgiserial.c index b4e4feb8bb87..448a587b4d3c 100644 --- a/drivers/sgi/char/sgiserial.c +++ b/drivers/sgi/char/sgiserial.c @@ -1503,12 +1503,6 @@ static void rs_close(struct tty_struct *tty, struct file * filp) } info->flags |= ZILOG_CLOSING; /* - * Save the termios structure, since this port may have - * separate termios for callout and dialin. - */ - if (info->flags & ZILOG_NORMAL_ACTIVE) - info->normal_termios = *tty->termios; - /* * Now we wait for the transmit buffer to clear; and we notify * the line discipline to only process XON/XOFF characters. */ @@ -1723,11 +1717,6 @@ int rs_open(struct tty_struct *tty, struct file * filp) return retval; } - if ((info->count == 1) && (info->flags & ZILOG_SPLIT_TERMIOS)) { - *tty->termios = info->normal_termios; - change_speed(info); - } - /* If this is the serial console change the speed to * the right value */ @@ -1941,7 +1930,6 @@ int rs_init(void) info->tqueue.data = info; info->tqueue_hangup.routine = do_serial_hangup; info->tqueue_hangup.data = info; - info->normal_termios = serial_driver.init_termios; init_waitqueue_head(&info->open_wait); init_waitqueue_head(&info->close_wait); printk("tty%02d at 0x%04x (irq = %d)", info->line, diff --git a/drivers/sgi/char/sgiserial.h b/drivers/sgi/char/sgiserial.h index 44d044fcf0bf..5834dcf4704f 100644 --- a/drivers/sgi/char/sgiserial.h +++ b/drivers/sgi/char/sgiserial.h @@ -154,7 +154,6 @@ struct sgi_serial { int xmit_cnt; struct tq_struct tqueue; struct tq_struct tqueue_hangup; - struct termios normal_termios; wait_queue_head_t open_wait; wait_queue_head_t close_wait; }; diff --git a/drivers/tc/zs.c b/drivers/tc/zs.c index 1ea6153cb1e2..a5112d72bbf2 100644 --- a/drivers/tc/zs.c +++ b/drivers/tc/zs.c @@ -1386,12 +1386,6 @@ static void rs_close(struct tty_struct *tty, struct file * filp) } info->flags |= ZILOG_CLOSING; /* - * Save the termios structure, since this port may have - * separate termios for callout and dialin. - */ - if (info->flags & ZILOG_NORMAL_ACTIVE) - info->normal_termios = *tty->termios; - /* * Now we wait for the transmit buffer to clear; and we notify * the line discipline to only process XON/XOFF characters. */ @@ -1656,10 +1650,6 @@ int rs_open(struct tty_struct *tty, struct file * filp) return retval; } - if ((info->count == 1) && (info->flags & ZILOG_SPLIT_TERMIOS)) { - *tty->termios = info->normal_termios; - change_speed(info); - } #ifdef CONFIG_SERIAL_CONSOLE if (sercons.cflag && sercons.index == line) { tty->termios->c_cflag = sercons.cflag; @@ -1904,7 +1894,6 @@ int __init zs_init(void) info->blocked_open = 0; info->tqueue.routine = do_softint; info->tqueue.data = info; - info->normal_termios = serial_driver.init_termios; init_waitqueue_head(&info->open_wait); init_waitqueue_head(&info->close_wait); printk("ttyS%02d at 0x%08x (irq = %d)", info->line, diff --git a/drivers/tc/zs.h b/drivers/tc/zs.h index eda845878090..72f555f00aa7 100644 --- a/drivers/tc/zs.h +++ b/drivers/tc/zs.h @@ -150,7 +150,6 @@ struct dec_serial { int xmit_cnt; struct tq_struct tqueue; struct tq_struct tqueue_hangup; - struct termios normal_termios; wait_queue_head_t open_wait; wait_queue_head_t close_wait; }; diff --git a/include/linux/cyclades.h b/include/linux/cyclades.h index 1e4165e822c2..0be662bf061d 100644 --- a/include/linux/cyclades.h +++ b/include/linux/cyclades.h @@ -596,7 +596,6 @@ struct cyclades_port { int default_timeout; unsigned long jiffies[3]; unsigned long rflush_count; - struct termios normal_termios; struct cyclades_monitor mon; struct cyclades_idle_stats idle_stats; struct cyclades_icount icount; diff --git a/include/linux/generic_serial.h b/include/linux/generic_serial.h index 35ee1c1fdd3e..fcd3c18a98c5 100644 --- a/include/linux/generic_serial.h +++ b/include/linux/generic_serial.h @@ -36,7 +36,6 @@ struct gs_port { int xmit_cnt; /* struct semaphore port_write_sem; */ int flags; - struct termios normal_termios; wait_queue_head_t open_wait; wait_queue_head_t close_wait; int count; diff --git a/include/linux/hayesesp.h b/include/linux/hayesesp.h index 6c1e096b77ed..131d71116c14 100644 --- a/include/linux/hayesesp.h +++ b/include/linux/hayesesp.h @@ -102,7 +102,6 @@ struct esp_struct { int xmit_cnt; struct work_struct tqueue; struct work_struct tqueue_hangup; - struct termios normal_termios; wait_queue_head_t open_wait; wait_queue_head_t close_wait; wait_queue_head_t delta_msr_wait; diff --git a/include/linux/isdn.h b/include/linux/isdn.h index 88326d844312..fe4e4f154b1c 100644 --- a/include/linux/isdn.h +++ b/include/linux/isdn.h @@ -343,7 +343,6 @@ typedef struct modem_info { struct timer_list ring_timer; /* for writing 'RING' responses */ struct timer_list connect_timer; /* waiting for CONNECT */ struct timer_list read_timer; /* read incoming data */ - struct termios normal_termios; /* For saving termios structs */ wait_queue_head_t open_wait, close_wait; struct semaphore write_sem; } modem_info; diff --git a/include/linux/isicom.h b/include/linux/isicom.h index a7d9dd5cd5e5..c24383215978 100644 --- a/include/linux/isicom.h +++ b/include/linux/isicom.h @@ -158,7 +158,6 @@ struct isi_port { int xmit_head; int xmit_tail; int xmit_cnt; - struct termios normal_termios; }; diff --git a/include/linux/istallion.h b/include/linux/istallion.h index a712bf1c0120..0376ed672c0b 100644 --- a/include/linux/istallion.h +++ b/include/linux/istallion.h @@ -78,7 +78,6 @@ typedef struct { wait_queue_head_t raw_wait; #endif struct work_struct tqhangup; - struct termios normaltermios; asysigs_t asig; unsigned long addr; unsigned long rxoffset; diff --git a/include/linux/serial167.h b/include/linux/serial167.h index 1573385b24bc..71b6df2516a6 100644 --- a/include/linux/serial167.h +++ b/include/linux/serial167.h @@ -50,7 +50,6 @@ struct cyclades_port { int default_threshold; int default_timeout; struct work_struct tqueue; - struct termios normal_termios; wait_queue_head_t open_wait; wait_queue_head_t close_wait; struct cyclades_monitor mon; diff --git a/include/linux/serialP.h b/include/linux/serialP.h index 9900626e1027..b4a17afde7df 100644 --- a/include/linux/serialP.h +++ b/include/linux/serialP.h @@ -49,7 +49,6 @@ struct serial_state { unsigned short close_delay; unsigned short closing_wait; /* time to wait before closing */ struct async_icount icount; - struct termios normal_termios; int io_type; struct async_struct *info; struct pci_dev *dev; diff --git a/include/linux/stallion.h b/include/linux/stallion.h index 298bb015dadd..bb0d71b263d1 100644 --- a/include/linux/stallion.h +++ b/include/linux/stallion.h @@ -100,7 +100,6 @@ typedef struct stlport { wait_queue_head_t open_wait; wait_queue_head_t close_wait; #endif - struct termios normaltermios; struct work_struct tqueue; comstats_t stats; stlrq_t tx; diff --git a/include/net/irda/ircomm_tty.h b/include/net/irda/ircomm_tty.h index 0b446540751d..dbb43c14934d 100644 --- a/include/net/irda/ircomm_tty.h +++ b/include/net/irda/ircomm_tty.h @@ -92,8 +92,6 @@ struct ircomm_tty_cb { void *skey; void *ckey; - struct termios normal_termios; - wait_queue_head_t open_wait; wait_queue_head_t close_wait; struct timer_list watchdog_timer; |
