n = hvc_get_chars(hp->vtermno, buf, count); 
n = hp->ops->get_chars(hp->vtermno, buf, count); 
static int hvc_poll(struct hvc_struct *hp){	struct tty_struct *tty;	int i, n, poll_mask = 0;	char buf[N_INBUF] __ALIGNED__;	unsigned long flags;	int read_total = 0;	spin_lock_irqsave(&hp->lock, flags);	/* Push pending writes */	if (hp->n_outbuf > 0)		hvc_push(hp);	/* Reschedule us if still some write pending */	if (hp->n_outbuf > 0)		poll_mask |= HVC_POLL_WRITE;	/* No tty attached, just skip */	tty = hp->tty;	if (tty == NULL)		goto bail;	/* Now check if we can get data (are we throttled ?) */	if (test_bit(TTY_THROTTLED, &tty->flags))		goto throttled;	/* If we aren't interrupt driven and aren't throttled, we always	 * request a reschedule	 */	if (hp->irq == NO_IRQ)		poll_mask |= HVC_POLL_READ;	/* Read data if any */	for (;;) {		int count = N_INBUF;		if (count > (TTY_FLIPBUF_SIZE - tty->flip.count))			count = TTY_FLIPBUF_SIZE - tty->flip.count;		/* If flip is full, just reschedule a later read */		if (count == 0) {			poll_mask |= HVC_POLL_READ;			break;		}		n = hvc_get_chars(hp->vtermno, buf, count);		if (n <= 0) {			/* Hangup the tty when disconnected from host */			if (n == -EPIPE) {				spin_unlock_irqrestore(&hp->lock, flags);				tty_hangup(tty);				spin_lock_irqsave(&hp->lock, flags);			}			break;		}		for (i = 0; i < n; ++i) {#ifdef CONFIG_MAGIC_SYSRQ			if (hp->index == hvc_con_driver.index) {				/* Handle the SysRq Hack */				/* XXX should support a sequence */				if (buf[i] == '\x0f') {	/* ^O */					sysrq_pressed = 1;					continue;				} else if (sysrq_pressed) {					handle_sysrq(buf[i], NULL, tty);					sysrq_pressed = 0;					continue;				}			}#endif /* CONFIG_MAGIC_SYSRQ */			tty_insert_flip_char(tty, buf[i], 0);		}		if (tty->flip.count)			tty_schedule_flip(tty);		/*		 * Account for the total amount read in one loop, and if above		 * 64 bytes, we do a quick schedule loop to let the tty grok		 * the data and eventually throttle us.		 */		read_total += n;		if (read_total >= 64) {			poll_mask |= HVC_POLL_QUICK;			break;		}	} throttled:	/* Wakeup write queue if necessary */	if (hp->do_wakeup) {		hp->do_wakeup = 0;		tty_wakeup(tty);	} bail:	spin_unlock_irqrestore(&hp->lock, flags);	return poll_mask;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/030ffad23fb28fc29608a3bc21f0c3b88bf28592/hvc_console.c/clean/drivers/char/hvc_console.c