set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(20); 
schedule_timeout_interruptible(20); 
isdn_tty_close(struct tty_struct *tty, struct file *filp){	modem_info *info = (modem_info *) tty->driver_data;	ulong timeout;	if (!info || isdn_tty_paranoia_check(info, tty->name, "isdn_tty_close"))		return;	if (tty_hung_up_p(filp)) {#ifdef ISDN_DEBUG_MODEM_OPEN		printk(KERN_DEBUG "isdn_tty_close return after tty_hung_up_p\n");#endif		return;	}	if ((tty->count == 1) && (info->count != 1)) {		/*		 * Uh, oh.  tty->count is 1, which means that the tty		 * structure will be freed.  Info->count should always		 * be one in these conditions.  If it's greater than		 * one, we've got real problems, since it means the		 * serial port won't be shutdown.		 */		printk(KERN_ERR "isdn_tty_close: bad port count; tty->count is 1, "		       "info->count is %d\n", info->count);		info->count = 1;	}	if (--info->count < 0) {		printk(KERN_ERR "isdn_tty_close: bad port count for ttyi%d: %d\n",		       info->line, info->count);		info->count = 0;	}	if (info->count) {#ifdef ISDN_DEBUG_MODEM_OPEN		printk(KERN_DEBUG "isdn_tty_close after info->count != 0\n");#endif		return;	}	info->flags |= ISDN_ASYNC_CLOSING;	/*	 * Save the termios structure, since this port may have	 * separate termios for callout and dialin.	 */	if (info->flags & ISDN_ASYNC_NORMAL_ACTIVE)		info->normal_termios = *tty->termios;	if (info->flags & ISDN_ASYNC_CALLOUT_ACTIVE)		info->callout_termios = *tty->termios;	tty->closing = 1;	/*	 * At this point we stop accepting input.  To do this, we	 * disable the receive line status interrupts, and tell the	 * interrupt driver to stop checking the data ready bit in the	 * line status register.	 */	if (info->flags & ISDN_ASYNC_INITIALIZED) {		tty_wait_until_sent(tty, 3000);	/* 30 seconds timeout */		/*		 * Before we drop DTR, make sure the UART transmitter		 * has completely drained; this is especially		 * important if there is a transmit FIFO!		 */		timeout = jiffies + HZ;		while (!(info->lsr & UART_LSR_TEMT)) {			set_current_state(TASK_INTERRUPTIBLE);			schedule_timeout(20);			if (time_after(jiffies,timeout))				break;		}	}	dev->modempoll--;	isdn_tty_shutdown(info);		if (tty->driver->flush_buffer)		tty->driver->flush_buffer(tty);	tty_ldisc_flush(tty);	info->tty = NULL;	info->ncarrier = 0;	tty->closing = 0;	module_put(info->owner);	if (info->blocked_open) {		msleep_interruptible(500);		wake_up_interruptible(&info->open_wait);	}	info->flags &= ~(ISDN_ASYNC_NORMAL_ACTIVE | ISDN_ASYNC_CLOSING);	wake_up_interruptible(&info->close_wait);#ifdef ISDN_DEBUG_MODEM_OPEN	printk(KERN_DEBUG "isdn_tty_close normal exit\n");#endif}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/24763c48a3c9cdf0a138038b51a7fca65859cd78/isdn_tty.c/clean/drivers/isdn/i4l/isdn_tty.c