summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2015-02-24 12:06:34 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-07 03:28:01 +0100
commit7950dc586092d0c7a8b881188061cc3dc133d7e9 (patch)
treee8c1279d38c6da6444ecae120363c61d14f8252d /drivers/tty
parent17b8f2a3fdca29a9b296642fb3f6ad3c39ffc7d3 (diff)
downloadop-kernel-dev-7950dc586092d0c7a8b881188061cc3dc133d7e9.zip
op-kernel-dev-7950dc586092d0c7a8b881188061cc3dc133d7e9.tar.gz
serial: sprd: Fix iotype
The Spreadtrum UART is accessed with mmio; declare the proper iotype. Also prevent userspace from assigning any other iotype via ioctl(TIOCSSERIAL). Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/sprd_serial.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/tty/serial/sprd_serial.c b/drivers/tty/serial/sprd_serial.c
index be3ed3f..2e6d63e 100644
--- a/drivers/tty/serial/sprd_serial.c
+++ b/drivers/tty/serial/sprd_serial.c
@@ -491,6 +491,8 @@ static int sprd_verify_port(struct uart_port *port,
return -EINVAL;
if (port->irq != ser->irq)
return -EINVAL;
+ if (port->iotype != ser->io_type)
+ return -EINVAL;
return 0;
}
@@ -705,7 +707,7 @@ static int sprd_probe(struct platform_device *pdev)
up->dev = &pdev->dev;
up->line = index;
up->type = PORT_SPRD;
- up->iotype = SERIAL_IO_PORT;
+ up->iotype = UPIO_MEM;
up->uartclk = SPRD_DEF_RATE;
up->fifosize = SPRD_FIFO_SIZE;
up->ops = &serial_sprd_ops;
OpenPOWER on IntegriCloud