Commit 0fd6875c authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] callout removal: simserial

callout removal: simserial
parent afeedd0a
...@@ -104,7 +104,6 @@ static struct serial_uart_config uart_config[] = { ...@@ -104,7 +104,6 @@ static struct serial_uart_config uart_config[] = {
}; };
struct tty_driver hp_simserial_driver; struct tty_driver hp_simserial_driver;
static struct tty_driver callout_driver;
static int serial_refcount; static int serial_refcount;
static struct async_struct *IRQ_ports[NR_IRQS]; static struct async_struct *IRQ_ports[NR_IRQS];
...@@ -689,7 +688,7 @@ static void rs_close(struct tty_struct *tty, struct file * filp) ...@@ -689,7 +688,7 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
} }
wake_up_interruptible(&info->open_wait); wake_up_interruptible(&info->open_wait);
} }
info->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CALLOUT_ACTIVE|ASYNC_CLOSING); info->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING);
wake_up_interruptible(&info->close_wait); wake_up_interruptible(&info->close_wait);
MOD_DEC_USE_COUNT; MOD_DEC_USE_COUNT;
} }
...@@ -723,7 +722,7 @@ static void rs_hangup(struct tty_struct *tty) ...@@ -723,7 +722,7 @@ static void rs_hangup(struct tty_struct *tty)
info->event = 0; info->event = 0;
state->count = 0; state->count = 0;
info->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CALLOUT_ACTIVE); info->flags &= ~ASYNC_NORMAL_ACTIVE;
info->tty = 0; info->tty = 0;
wake_up_interruptible(&info->open_wait); wake_up_interruptible(&info->open_wait);
} }
...@@ -937,10 +936,7 @@ static int rs_open(struct tty_struct *tty, struct file * filp) ...@@ -937,10 +936,7 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
if ((info->state->count == 1) && if ((info->state->count == 1) &&
(info->flags & ASYNC_SPLIT_TERMIOS)) { (info->flags & ASYNC_SPLIT_TERMIOS)) {
if (tty->driver->subtype == SERIAL_TYPE_NORMAL) *tty->termios = info->state->normal_termios;
*tty->termios = info->state->normal_termios;
else
*tty->termios = info->state->callout_termios;
} }
/* /*
...@@ -952,9 +948,6 @@ static int rs_open(struct tty_struct *tty, struct file * filp) ...@@ -952,9 +948,6 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
console = console->next; console = console->next;
} }
info->session = current->session;
info->pgrp = current->pgrp;
#ifdef SIMSERIAL_DEBUG #ifdef SIMSERIAL_DEBUG
printk("rs_open ttys%d successful\n", info->line); printk("rs_open ttys%d successful\n", info->line);
#endif #endif
...@@ -1084,23 +1077,10 @@ simrs_init (void) ...@@ -1084,23 +1077,10 @@ simrs_init (void)
state->port, state->irq, state->port, state->irq,
uart_config[state->type].name); uart_config[state->type].name);
} }
/*
* The callout device is just like normal device except for
* major number and the subtype code.
*/
callout_driver = hp_simserial_driver;
callout_driver.name = "cua";
callout_driver.major = TTYAUX_MAJOR;
callout_driver.subtype = SERIAL_TYPE_CALLOUT;
callout_driver.read_proc = 0;
callout_driver.proc_entry = 0;
if (tty_register_driver(&hp_simserial_driver)) if (tty_register_driver(&hp_simserial_driver))
panic("Couldn't register simserial driver\n"); panic("Couldn't register simserial driver\n");
if (tty_register_driver(&callout_driver))
panic("Couldn't register callout driver\n");
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment