/* Locking: The routine gets called under an irqsave() spinlock; and the routine locks the struct hvc_iucv_private->lock to call helper functions.  */
static int hvc_iucv_get_chars(uint32_t vtermno, char *buf, int count)
/* Locking: The routine gets called under an irqsave() spinlock; and the routine locks the struct hvc_iucv_private->lock to call helper functions.  */
static int hvc_iucv_get_chars(uint32_t vtermno, char *buf, int count)
{
	struct hvc_iucv_private *priv = hvc_iucv_get_private(vtermno);
	int written;
	int has_more_data;
	if (count <= 0)
		return 0;
	if (!priv)
		return -ENODEV;
	spin_lock(&priv->lock);
	has_more_data = 0;
	written = hvc_iucv_write(priv, buf, count, &has_more_data);
	spin_unlock(&priv->lock);
	if (has_more_data)
		hvc_kick();
	return written;
}