goto out_unlock;
err = 0;
- if (line->count++)
+ if (line->port.count++)
goto out_unlock;
BUG_ON(tty->driver_data);
mutex_lock(&line->count_lock);
BUG_ON(!line->valid);
- if (--line->count)
+ if (--line->port.count)
goto out_unlock;
line->tty = NULL;
mutex_lock(&line->count_lock);
- if (line->count) {
+ if (line->port.count) {
*error_out = "Device is already open";
goto out;
}
driver->init_termios = tty_std_termios;
for (i = 0; i < nlines; i++) {
+ tty_port_init(&lines[i].port);
spin_lock_init(&lines[i].lock);
mutex_init(&lines[i].count_lock);
lines[i].driver = line_driver;