/* Parameter: card = pointer to card struct. c = char to store.  */
static void isdnloop_putmsg(isdnloop_card *card, unsigned char c)
/* Parameter: card = pointer to card struct. c = char to store.  */
static void isdnloop_putmsg(isdnloop_card *card, unsigned char c)
{
	ulong flags;
	spin_lock_irqsave(&card->isdnloop_lock, flags);
	*card->msg_buf_write++ = (c == 0xff) ? '\n' : c;
	if (card->msg_buf_write == card->msg_buf_read) {
		if (++card->msg_buf_read > card->msg_buf_end)
			card->msg_buf_read = card->msg_buf;
	}
	if (card->msg_buf_write > card->msg_buf_end)
		card->msg_buf_write = card->msg_buf;
	spin_unlock_irqrestore(&card->isdnloop_lock, flags);
}