/* Indicates if there are any data in the buffer  */
static int ircomm_tty_chars_in_buffer(struct tty_struct *tty)
/* Indicates if there are any data in the buffer  */
static int ircomm_tty_chars_in_buffer(struct tty_struct *tty)
{
	struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
	unsigned long flags;
	int len = 0;
	IRDA_ASSERT(self != NULL, return -1;);
	IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
	spin_lock_irqsave(&self->spinlock, flags);
	if (self->tx_skb)
		len = self->tx_skb->len;
	spin_unlock_irqrestore(&self->spinlock, flags);
	return len;
}