Request initial configuration on tty open.
--- a/tty/module.c Fri Jan 22 10:36:36 2010 +0100
+++ b/tty/module.c Fri Jan 22 11:02:04 2010 +0100
@@ -336,7 +336,7 @@
static int ec_tty_open(struct tty_struct *tty, struct file *file)
{
ec_tty_t *t;
- int line = tty->index;
+ int line = tty->index, ret;
#if EC_TTY_DEBUG >= 1
printk(KERN_INFO PFX "Opening line %i.\n", line);
@@ -357,6 +357,15 @@
t->tty = tty;
tty->driver_data = t;
+
+ // request initial settings
+ ret = t->cflag_cb(t->cb_data, t->tty->termios->c_cflag);
+ if (ret) {
+ printk(KERN_ERR PFX "Error: Device does not accept"
+ " initial configuration!\n");
+ return ret;
+ }
+
return 0;
}