/* This routine is called whenever a serial port is opened. It enables interrupts for a serial port, linking in its S structure into the IRQ chain. It also performs the serial-specific initialization for the tty structure.  */
int rs_open(struct tty_struct *tty, struct file *filp)
/* This routine is called whenever a serial port is opened. It enables interrupts for a serial port, linking in its S structure into the IRQ chain. It also performs the serial-specific initialization for the tty structure.  */
int rs_open(struct tty_struct *tty, struct file *filp)
{
	struct m68k_serial	*info;
	int 			retval, line;
	line = tty->index;
	if (line >= NR_PORTS || line < 0)
		return -ENODEV;
	info = &m68k_soft[line];
	if (serial_paranoia_check(info, tty->name, "rs_open"))
		return -ENODEV;
	info->count++;
	tty->driver_data = info;
	info->port.tty = tty;
	retval = startup(info);
	if (retval)
		return retval;
	return block_til_ready(tty, filp, info);
}