/* This routine is called when the 3270 tty is closed. We wait for the remaining request to be completed. Then we clean up.  */
static int fs3270_close(struct inode *inode, struct file *filp)
/* This routine is called when the 3270 tty is closed. We wait for the remaining request to be completed. Then we clean up.  */
static int fs3270_close(struct inode *inode, struct file *filp)
{
	struct fs3270 *fp;
	fp = filp->private_data;
	filp->private_data = NULL;
	if (fp) {
		put_pid(fp->fs_pid);
		fp->fs_pid = NULL;
		raw3270_reset(&fp->view);
		raw3270_put_view(&fp->view);
		raw3270_del_view(&fp->view);
	}
	return 0;
}