/* This function can be used by dongles etc. to set or reset the status of the dtr and rts lines  */
static int irtty_set_dtr_rts(struct sir_dev *dev, int dtr, int rts)
/* This function can be used by dongles etc. to set or reset the status of the dtr and rts lines  */
static int irtty_set_dtr_rts(struct sir_dev *dev, int dtr, int rts)
{
	struct sirtty_cb *priv = dev->priv;
	int set = 0;
	int clear = 0;
	IRDA_ASSERT(priv != NULL, return -1;);
	IRDA_ASSERT(priv->magic == IRTTY_MAGIC, return -1;);
	if (rts)
		set |= TIOCM_RTS;
	else
		clear |= TIOCM_RTS;
	if (dtr)
		set |= TIOCM_DTR;
	else
		clear |= TIOCM_DTR;
	IRDA_ASSERT(priv->tty->ops->tiocmset != NULL, return -1;);
	priv->tty->ops->tiocmset(priv->tty, NULL, set, clear);
	return 0;
}