Skip to contentSkip to conversation

tty: serial: sa1100.c: use UPIO_MEM rather than SERIAL_IO_MEM

PATCH In review Saurabh Sengar 2 participants 2 messages Oct 27, 2015 – Oct 28, 2015 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tty: serial: sa1100.c: use UPIO_MEM rather than SERIAL_IO_MEM

use UPIO_MEM rather then SERIAL_IO_MEM.
both have the same value

---
 drivers/tty/serial/sa1100.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/sa1100.c +1 -1
index fd3d132..283c7e0 100644
@@ -579,7 +579,7 @@ sa1100_verify_port(struct uart_port *port, struct serial_struct *ser)
 		ret = -EINVAL;
 	if (sport->port.irq != ser->irq)
 		ret = -EINVAL;
-	if (ser->io_type != SERIAL_IO_MEM)
+	if (ser->io_type != UPIO_MEM)
 		ret = -EINVAL;
 	if (sport->port.uartclk / 16 != ser->baud_base)
 		ret = -EINVAL;
Signature · 1 line
1.9.1
#1 lore raw

Hi Saurabh,

Quoted 13 lines · Saurabh Sengar

use UPIO_MEM rather then SERIAL_IO_MEM.
both have the same value

---
 drivers/tty/serial/sa1100.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/sa1100.c +0 -0
index fd3d132..283c7e0 100644

drivers/tty/serial/sa1100.c sa1100_verify_port(struct uart_port *port, struct serial_struct *ser) · line 582

Quoted 5 lines
drivers/tty/serial/sa1100.c +1 -1
@@ -579,7 +579,7 @@ sa1100_verify_port(struct uart_port *port, struct serial_struct *ser)
 		ret = -EINVAL;
 	if (sport->port.irq != ser->irq)
 		ret = -EINVAL;
-	if (ser->io_type != SERIAL_IO_MEM)
+	if (ser->io_type != UPIO_MEM)

SERIAL_IO_* io_type defines are the appropriate constants for the struct serial_struct::io_type field. Both are defined in the uapi header, include/uapi/linux/serial.h

UPIO_* io_type defines are the appropriate constants for the struct uart_port::io_type field. Both are defined in the kernel header, include/kernel/serial_core.h

I defined the UPIO_* io_types in terms of SERIAL_IO_* because userspace breakage was occurring as contributors were changing the UPIO_* constant values.

Regards,
Peter Hurley

Quoted 4 lines
drivers/tty/serial/sa1100.c +0 -0
 		ret = -EINVAL;
 	if (sport->port.uartclk / 16 != ser->baud_base)
 		ret = -EINVAL;