Commit 7eaec37e authored by Al Viro's avatar Al Viro

mos7720: bury dead TIOCM... in ->ioctl()

These ioctls never reach driver's ->ioctl() - tty_ioctl() handles
them on its own.  ->tiocm[gs]et() is what actually gets called,
and mos7720 provides those, with results equivalent to what the
unreachable code would be doing when called.
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent a913bc76
......@@ -1786,51 +1786,6 @@ static int mos7720_tiocmset(struct tty_struct *tty,
return 0;
}
static int set_modem_info(struct moschip_port *mos7720_port, unsigned int cmd,
unsigned int __user *value)
{
unsigned int mcr;
unsigned int arg;
struct usb_serial_port *port;
if (mos7720_port == NULL)
return -1;
port = (struct usb_serial_port *)mos7720_port->port;
mcr = mos7720_port->shadowMCR;
if (copy_from_user(&arg, value, sizeof(int)))
return -EFAULT;
switch (cmd) {
case TIOCMBIS:
if (arg & TIOCM_RTS)
mcr |= UART_MCR_RTS;
if (arg & TIOCM_DTR)
mcr |= UART_MCR_RTS;
if (arg & TIOCM_LOOP)
mcr |= UART_MCR_LOOP;
break;
case TIOCMBIC:
if (arg & TIOCM_RTS)
mcr &= ~UART_MCR_RTS;
if (arg & TIOCM_DTR)
mcr &= ~UART_MCR_RTS;
if (arg & TIOCM_LOOP)
mcr &= ~UART_MCR_LOOP;
break;
}
mos7720_port->shadowMCR = mcr;
write_mos_reg(port->serial, port->port_number, MOS7720_MCR,
mos7720_port->shadowMCR);
return 0;
}
static int get_serial_info(struct moschip_port *mos7720_port,
struct serial_struct __user *retinfo)
{
......@@ -1868,13 +1823,6 @@ static int mos7720_ioctl(struct tty_struct *tty,
return get_lsr_info(tty, mos7720_port,
(unsigned int __user *)arg);
/* FIXME: These should be using the mode methods */
case TIOCMBIS:
case TIOCMBIC:
dev_dbg(&port->dev, "%s TIOCMSET/TIOCMBIC/TIOCMSET\n", __func__);
return set_modem_info(mos7720_port, cmd,
(unsigned int __user *)arg);
case TIOCGSERIAL:
dev_dbg(&port->dev, "%s TIOCGSERIAL\n", __func__);
return get_serial_info(mos7720_port,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment