diff options
-rw-r--r-- | drivers/tty/serial/8250/8250_core.c | 39 | ||||
-rw-r--r-- | include/linux/serial_8250.h | 3 |
2 files changed, 0 insertions, 42 deletions
diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c index 3f2c6576ab4e..30522d680014 100644 --- a/drivers/tty/serial/8250/8250_core.c +++ b/drivers/tty/serial/8250/8250_core.c | |||
@@ -3005,42 +3005,6 @@ serial8250_verify_port(struct uart_port *port, struct serial_struct *ser) | |||
3005 | return 0; | 3005 | return 0; |
3006 | } | 3006 | } |
3007 | 3007 | ||
3008 | static int serial8250_ioctl(struct uart_port *port, unsigned int cmd, | ||
3009 | unsigned long arg) | ||
3010 | { | ||
3011 | struct uart_8250_port *up = | ||
3012 | container_of(port, struct uart_8250_port, port); | ||
3013 | int ret; | ||
3014 | struct serial_rs485 rs485_config; | ||
3015 | |||
3016 | if (!up->rs485_config) | ||
3017 | return -ENOIOCTLCMD; | ||
3018 | |||
3019 | switch (cmd) { | ||
3020 | case TIOCSRS485: | ||
3021 | if (copy_from_user(&rs485_config, (void __user *)arg, | ||
3022 | sizeof(rs485_config))) | ||
3023 | return -EFAULT; | ||
3024 | |||
3025 | ret = up->rs485_config(up, &rs485_config); | ||
3026 | if (ret) | ||
3027 | return ret; | ||
3028 | |||
3029 | memcpy(&up->rs485, &rs485_config, sizeof(rs485_config)); | ||
3030 | |||
3031 | return 0; | ||
3032 | case TIOCGRS485: | ||
3033 | if (copy_to_user((void __user *)arg, &up->rs485, | ||
3034 | sizeof(up->rs485))) | ||
3035 | return -EFAULT; | ||
3036 | return 0; | ||
3037 | default: | ||
3038 | break; | ||
3039 | } | ||
3040 | |||
3041 | return -ENOIOCTLCMD; | ||
3042 | } | ||
3043 | |||
3044 | static const char * | 3008 | static const char * |
3045 | serial8250_type(struct uart_port *port) | 3009 | serial8250_type(struct uart_port *port) |
3046 | { | 3010 | { |
@@ -3072,7 +3036,6 @@ static struct uart_ops serial8250_pops = { | |||
3072 | .request_port = serial8250_request_port, | 3036 | .request_port = serial8250_request_port, |
3073 | .config_port = serial8250_config_port, | 3037 | .config_port = serial8250_config_port, |
3074 | .verify_port = serial8250_verify_port, | 3038 | .verify_port = serial8250_verify_port, |
3075 | .ioctl = serial8250_ioctl, | ||
3076 | #ifdef CONFIG_CONSOLE_POLL | 3039 | #ifdef CONFIG_CONSOLE_POLL |
3077 | .poll_get_char = serial8250_get_poll_char, | 3040 | .poll_get_char = serial8250_get_poll_char, |
3078 | .poll_put_char = serial8250_put_poll_char, | 3041 | .poll_put_char = serial8250_put_poll_char, |
@@ -3615,8 +3578,6 @@ int serial8250_register_8250_port(struct uart_8250_port *up) | |||
3615 | uart->port.fifosize = up->port.fifosize; | 3578 | uart->port.fifosize = up->port.fifosize; |
3616 | uart->tx_loadsz = up->tx_loadsz; | 3579 | uart->tx_loadsz = up->tx_loadsz; |
3617 | uart->capabilities = up->capabilities; | 3580 | uart->capabilities = up->capabilities; |
3618 | uart->rs485_config = up->rs485_config; | ||
3619 | uart->rs485 = up->rs485; | ||
3620 | uart->port.throttle = up->port.throttle; | 3581 | uart->port.throttle = up->port.throttle; |
3621 | uart->port.unthrottle = up->port.unthrottle; | 3582 | uart->port.unthrottle = up->port.unthrottle; |
3622 | uart->port.rs485_config = up->port.rs485_config; | 3583 | uart->port.rs485_config = up->port.rs485_config; |
diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h index 3df10d5f154b..e02acf0a0ec9 100644 --- a/include/linux/serial_8250.h +++ b/include/linux/serial_8250.h | |||
@@ -97,13 +97,10 @@ struct uart_8250_port { | |||
97 | unsigned char msr_saved_flags; | 97 | unsigned char msr_saved_flags; |
98 | 98 | ||
99 | struct uart_8250_dma *dma; | 99 | struct uart_8250_dma *dma; |
100 | struct serial_rs485 rs485; | ||
101 | 100 | ||
102 | /* 8250 specific callbacks */ | 101 | /* 8250 specific callbacks */ |
103 | int (*dl_read)(struct uart_8250_port *); | 102 | int (*dl_read)(struct uart_8250_port *); |
104 | void (*dl_write)(struct uart_8250_port *, int); | 103 | void (*dl_write)(struct uart_8250_port *, int); |
105 | int (*rs485_config)(struct uart_8250_port *, | ||
106 | struct serial_rs485 *rs485); | ||
107 | }; | 104 | }; |
108 | 105 | ||
109 | static inline struct uart_8250_port *up_to_u8250p(struct uart_port *up) | 106 | static inline struct uart_8250_port *up_to_u8250p(struct uart_port *up) |