struct async_struct *info = (struct async_struct *)tty->driver_data; 
struct async_struct *info; 
static int rs_write(struct tty_struct * tty, const unsigned char *buf, int count){	int	c, ret = 0;	struct async_struct *info = (struct async_struct *)tty->driver_data;	unsigned long flags;	if (serial_paranoia_check(info, tty->name, "rs_write"))		return 0;	if (!tty || !info->xmit.buf || !tmp_buf)		return 0;	local_save_flags(flags);	local_irq_disable();	while (1) {		c = CIRC_SPACE_TO_END(info->xmit.head,				      info->xmit.tail,				      SERIAL_XMIT_SIZE);		if (count < c)			c = count;		if (c <= 0) {			break;		}		memcpy(info->xmit.buf + info->xmit.head, buf, c);		info->xmit.head = ((info->xmit.head + c) &				   (SERIAL_XMIT_SIZE-1));		buf += c;		count -= c;		ret += c;	}	local_irq_restore(flags);	if (info->xmit.head != info->xmit.tail	    && !tty->stopped	    && !tty->hw_stopped	    && !(info->IER & UART_IER_THRI)) {		info->IER |= UART_IER_THRI;		local_irq_disable();		custom.intena = IF_SETCLR | IF_TBE;		mb();		/* set a pending Tx Interrupt, transmitter should restart now */		custom.intreq = IF_SETCLR | IF_TBE;		mb();		local_irq_restore(flags);	}	return ret;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/d9ad7ef1979d65a4200847ec91be5b9ad961eba8/amiserial.c/buggy/drivers/char/amiserial.c