printk(KERN_ERR"gs_put_char: NULL port pointer\n");
return;
}
gs_debug("gs_put_char: (%d,%p) char=0x%x, called from %p, %p, %p\n",port->port_num,tty,ch,__builtin_return_address(0),__builtin_return_address(1),__builtin_return_address(2));
spin_lock_irqsave(&port->port_lock,flags);
if(port->port_dev==NULL){
printk(KERN_ERR"gs_put_char: (%d,%p) port is not connected\n",
port->port_num,tty);
spin_unlock_irqrestore(&port->port_lock,flags);
return;
}
if(port->port_open_count==0){
printk(KERN_ERR"gs_put_char: (%d,%p) port is closed\n",
port->port_num,tty);
spin_unlock_irqrestore(&port->port_lock,flags);
return;
}
gs_buf_put(port->port_write_buf,&ch,1);
spin_unlock_irqrestore(&port->port_lock,flags);
}
/*
* gs_flush_chars
*/
staticvoidgs_flush_chars(structtty_struct*tty)
{
unsignedlongflags;
structgs_port*port=tty->driver_data;
if(port==NULL){
printk(KERN_ERR"gs_flush_chars: NULL port pointer\n");