summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>2014-11-06 09:22:52 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-11-06 14:59:21 -0800
commit41e69093fd608c0348fb12c0879ab464f986d2a8 (patch)
tree38a1415f3662e463f6b15f5d8c1762f9b542f915 /drivers/tty
parent46c55b4bb9b55b7b09b6879668a209a5657814b3 (diff)
downloadlinux-stable-41e69093fd608c0348fb12c0879ab464f986d2a8.tar.gz
linux-stable-41e69093fd608c0348fb12c0879ab464f986d2a8.tar.bz2
linux-stable-41e69093fd608c0348fb12c0879ab464f986d2a8.zip
8250/fintek: Use rs485 handler from serial_core
In order to remove the handler for rs485 ioctls on serial_8250, all the drivers must use the implementation on serial_core. Reviewed-by: Alan Cox <alan@linux.intel.com> Cc: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/8250/8250_fintek.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/tty/serial/8250/8250_fintek.c b/drivers/tty/serial/8250/8250_fintek.c
index 1bb28cb69493..1e6899bc9429 100644
--- a/drivers/tty/serial/8250/8250_fintek.c
+++ b/drivers/tty/serial/8250/8250_fintek.c
@@ -89,11 +89,11 @@ static int fintek_8250_check_id(void)
return 0;
}
-static int fintek_8250_rs4850_config(struct uart_8250_port *uart,
+static int fintek_8250_rs485_config(struct uart_port *port,
struct serial_rs485 *rs485)
{
uint8_t config = 0;
- int index = fintek_8250_get_index(uart->port.iobase);
+ int index = fintek_8250_get_index(port->iobase);
if (index < 0)
return -EINVAL;
@@ -134,6 +134,8 @@ static int fintek_8250_rs4850_config(struct uart_8250_port *uart,
outb(config, DATA_PORT);
fintek_8250_exit_key();
+ port->rs485 = *rs485;
+
return 0;
}
@@ -166,7 +168,7 @@ fintek_8250_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id)
uart.port.irq = pnp_irq(dev, 0);
uart.port.iobase = pnp_port_start(dev, 0);
uart.port.iotype = UPIO_PORT;
- uart.rs485_config = fintek_8250_rs4850_config;
+ uart.port.rs485_config = fintek_8250_rs485_config;
uart.port.flags |= UPF_SKIP_TEST | UPF_BOOT_AUTOCONF;
if (pnp_irq_flags(dev, 0) & IORESOURCE_IRQ_SHAREABLE)