/* Returns the state of the serial modem control lines. These next 2 functions are the way kernel versions > 2.5 handle modem control lines rather than IOCTLs.  */
static int rp_tiocmget(struct tty_struct *tty, struct file *file)
/* Returns the state of the serial modem control lines. These next 2 functions are the way kernel versions > 2.5 handle modem control lines rather than IOCTLs.  */
static int rp_tiocmget(struct tty_struct *tty, struct file *file)
{
	struct r_port *info = tty->driver_data;
	unsigned int control, result, ChanStatus;
	ChanStatus = sGetChanStatusLo(&info->channel);
	control = info->channel.TxControl[3];
	result = ((control & SET_RTS) ? TIOCM_RTS : 0) | 
		((control & SET_DTR) ?  TIOCM_DTR : 0) |
		((ChanStatus & CD_ACT) ? TIOCM_CAR : 0) |
		(sGetChanRI(&info->channel) ? TIOCM_RNG : 0) |
		((ChanStatus & DSR_ACT) ? TIOCM_DSR : 0) |
		((ChanStatus & CTS_ACT) ? TIOCM_CTS : 0);
	return result;
}