/* Return the number of bytes of data available in the circular buffer.  */
static unsigned int pl2303_buf_data_avail(struct pl2303_buf *pb)
/* Return the number of bytes of data available in the circular buffer.  */
static unsigned int pl2303_buf_data_avail(struct pl2303_buf *pb)
{
	if (pb == NULL)
		return 0;
	return (pb->buf_size + pb->buf_put - pb->buf_get) % pb->buf_size;
}