Commit a9c20a9c authored by Ricardo Ribalda Delgado's avatar Ricardo Ribalda Delgado Committed by Greg Kroah-Hartman

serial_core: Remove call to driver-specific TIO[GS]RS485]

Once there is no more handlers for TIOC[GS]RS485 there is no need to
call the driver specific ioctl when the generic implementation is
missing.
Reviewed-by: default avatarAlan Cox <alan@linux.intel.com>
Cc: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: default avatarRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c267d679
...@@ -1155,9 +1155,6 @@ static int uart_get_icount(struct tty_struct *tty, ...@@ -1155,9 +1155,6 @@ static int uart_get_icount(struct tty_struct *tty,
static int uart_get_rs485_config(struct uart_port *port, static int uart_get_rs485_config(struct uart_port *port,
struct serial_rs485 __user *rs485) struct serial_rs485 __user *rs485)
{ {
if (!port->rs485_config)
return -ENOIOCTLCMD;
if (copy_to_user(rs485, &port->rs485, sizeof(port->rs485))) if (copy_to_user(rs485, &port->rs485, sizeof(port->rs485)))
return -EFAULT; return -EFAULT;
return 0; return 0;
...@@ -1255,7 +1252,12 @@ uart_ioctl(struct tty_struct *tty, unsigned int cmd, ...@@ -1255,7 +1252,12 @@ uart_ioctl(struct tty_struct *tty, unsigned int cmd,
* All these rely on hardware being present and need to be * All these rely on hardware being present and need to be
* protected against the tty being hung up. * protected against the tty being hung up.
*/ */
switch (cmd) { switch (cmd) {
case TIOCSERGETLSR: /* Get line status register */
ret = uart_get_lsr_info(tty, state, uarg);
break;
case TIOCGRS485: case TIOCGRS485:
ret = uart_get_rs485_config(state->uart_port, uarg); ret = uart_get_rs485_config(state->uart_port, uarg);
break; break;
...@@ -1263,15 +1265,6 @@ uart_ioctl(struct tty_struct *tty, unsigned int cmd, ...@@ -1263,15 +1265,6 @@ uart_ioctl(struct tty_struct *tty, unsigned int cmd,
case TIOCSRS485: case TIOCSRS485:
ret = uart_set_rs485_config(state->uart_port, uarg); ret = uart_set_rs485_config(state->uart_port, uarg);
break; break;
}
if (ret != -ENOIOCTLCMD)
goto out;
switch (cmd) {
case TIOCSERGETLSR: /* Get line status register */
ret = uart_get_lsr_info(tty, state, uarg);
break;
default: { default: {
struct uart_port *uport = state->uart_port; struct uart_port *uport = state->uart_port;
if (uport->ops->ioctl) if (uport->ops->ioctl)
......
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