/* uart_get_lsr_info - get line status register info. Note: uart_ioctl protects us against hangups.  */
static int uart_get_lsr_info(struct uart_state *state, unsigned int __user *value)
/* uart_get_lsr_info - get line status register info. Note: uart_ioctl protects us against hangups.  */
static int uart_get_lsr_info(struct uart_state *state, unsigned int __user *value)
{
	struct uart_port *uport = state->uart_port;
	struct tty_port *port = &state->port;
	unsigned int result;
	result = uport->ops->tx_empty(uport);
	if (uport->x_char ||
	    ((uart_circ_chars_pending(&state->xmit) > 0) &&
	     !port->tty->stopped && !port->tty->hw_stopped))
		result &= ~TIOCSER_TEMT;
	return put_user(result, value);
}