Ejemplo n.º 1
0
static int smbsim_serial_open(struct tty_struct *tty, struct file *filp)
{
	SMBSIM_SERIAL_DEV *dev = smbsim_serial_devs + tty->index;

	TRACE_MSG(TRACE_LEVEL_INFO, TRACE_FLAG_DEFAULT, "0x%p\n", dev);
	return tty_port_open(&dev->tty_port, tty, filp);
}
Ejemplo n.º 2
0
static int acm_tty_open(struct tty_struct *tty, struct file *filp)
{
	struct acm *acm = tty->driver_data;

	dev_dbg(tty->dev, "%s\n", __func__);

	return tty_port_open(&acm->port, tty, filp);
}
Ejemplo n.º 3
0
static int ram_console_tty_open(struct tty_struct *tty, struct file *filp)
{
	tty->driver_data = &ram_console_port;
	printk("ram_console_tty open\n");
//	tty_set_ldisc(N_TTY);

	return tty_port_open(&ram_console_port.port, tty, filp);
}
Ejemplo n.º 4
0
static int ipoctal_open(struct tty_struct *tty, struct file *file)
{
	struct ipoctal_channel *channel;

	channel = dev_get_drvdata(tty->dev);
	tty->driver_data = channel;

	return tty_port_open(&channel->tty_port, tty, file);
}
Ejemplo n.º 5
0
/*
 * This function can be called multiple times for a given tty_struct, which is
 * why we initialize bc->ttys in ehv_bc_tty_port_activate() instead.
 *
 * The tty layer will still call this function even if the device was not
 * registered (i.e. tty_register_device() was not called).  This happens
 * because tty_register_device() is optional and some legacy drivers don't
 * use it.  So we need to check for that.
 */
static int ehv_bc_tty_open(struct tty_struct *ttys, struct file *filp)
{
	struct ehv_bc_data *bc = &bcs[ttys->index];

	if (!bc->dev)
		return -ENODEV;

	return tty_port_open(&bc->port, ttys, filp);
}
Ejemplo n.º 6
0
static int kgdb_nmi_tty_open(struct tty_struct *tty, struct file *file)
{
	struct kgdb_nmi_tty_priv *priv = tty->driver_data;
	unsigned int mode = file->f_flags & O_ACCMODE;
	int ret;

	ret = tty_port_open(&priv->port, tty, file);
	if (!ret && (mode == O_RDONLY || mode == O_RDWR))
		atomic_inc(&kgdb_nmi_num_readers);

	return ret;
}
Ejemplo n.º 7
0
/*
 * This routine is called whenever a serial port is opened.  It
 * enables interrupts for a serial port, linking in its async structure into
 * the IRQ chain.   It also performs the serial-specific
 * initialization for the tty structure.
 */
static int rs_open(struct tty_struct *tty, struct file * filp)
{
	struct serial_state *info = rs_table + tty->index;
	struct tty_port *port = &info->port;

	tty->driver_data = info;
	tty->low_latency = (port->flags & ASYNC_LOW_LATENCY) ? 1 : 0;

	/*
	 * figure out which console to use (should be one already)
	 */
	console = console_drivers;
	while (console) {
		if ((console->flags & CON_ENABLED) && console->write) break;
		console = console->next;
	}

	return tty_port_open(port, tty, filp);
}
Ejemplo n.º 8
0
static int ntty_open(struct tty_struct *tty, struct file *filp)
{
	struct port *port = tty->driver_data;
	return tty_port_open(&port->port, tty, filp);
}
static int tpk_open(struct tty_struct *tty, struct file *filp)
{
	tty->driver_data = &tpk_port;

	return tty_port_open(&tpk_port.port, tty, filp);
}
Ejemplo n.º 10
0
static int goldfish_tty_open(struct tty_struct *tty, struct file *filp)
{
	struct goldfish_tty *qtty = &goldfish_ttys[tty->index];
	return tty_port_open(&qtty->port, tty, filp);
}
Ejemplo n.º 11
0
static int smd_tty_open(struct tty_struct *tty, struct file *f)
{
	struct smd_tty_info *info = smd_tty + tty->index;

	return tty_port_open(&info->port, tty, f);
}
Ejemplo n.º 12
0
static int rpmsgtty_open(struct tty_struct *tty, struct file *filp)
{
    return tty_port_open(tty->port, tty, filp);
}
Ejemplo n.º 13
0
static int gdm_tty_open(struct tty_struct *tty, struct file *filp)
{
	struct gdm *gdm = tty->driver_data;

	return tty_port_open(&gdm->port, tty, filp);
}