Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

serial_txx9: Use UPF_FIXED_PORT

The UPF_FIXED_PORT flags was introduced in 2.6.22 and it can be used
instead of the driver specific verify_port routine.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Atsushi Nemoto and committed by
Linus Torvalds
37a6c7d0 b3b708fa

+5 -21
+5 -21
drivers/serial/serial_txx9.c
··· 33 33 34 34 #include <asm/io.h> 35 35 36 - static char *serial_version = "1.10"; 36 + static char *serial_version = "1.11"; 37 37 static char *serial_name = "TX39/49 Serial driver"; 38 38 39 39 #define PASS_LIMIT 256 ··· 63 63 * Number of serial ports 64 64 */ 65 65 #define UART_NR CONFIG_SERIAL_TXX9_NR_UARTS 66 - 67 - #define HIGH_BITS_OFFSET ((sizeof(long)-sizeof(int))*8) 68 66 69 67 struct uart_txx9_port { 70 68 struct uart_port port; ··· 750 752 serial_txx9_initialize(port); 751 753 } 752 754 753 - static int 754 - serial_txx9_verify_port(struct uart_port *port, struct serial_struct *ser) 755 - { 756 - unsigned long new_port = ser->port; 757 - if (HIGH_BITS_OFFSET) 758 - new_port += (unsigned long)ser->port_high << HIGH_BITS_OFFSET; 759 - if (ser->type != port->type || 760 - ser->irq != port->irq || 761 - ser->io_type != port->iotype || 762 - new_port != port->iobase || 763 - (unsigned long)ser->iomem_base != port->mapbase) 764 - return -EINVAL; 765 - return 0; 766 - } 767 - 768 755 static const char * 769 756 serial_txx9_type(struct uart_port *port) 770 757 { ··· 773 790 .release_port = serial_txx9_release_port, 774 791 .request_port = serial_txx9_request_port, 775 792 .config_port = serial_txx9_config_port, 776 - .verify_port = serial_txx9_verify_port, 777 793 }; 778 794 779 795 static struct uart_txx9_port serial_txx9_ports[UART_NR]; ··· 928 946 929 947 serial_txx9_ports[port->line].port = *port; 930 948 serial_txx9_ports[port->line].port.ops = &serial_txx9_pops; 931 - serial_txx9_ports[port->line].port.flags |= UPF_BOOT_AUTOCONF; 949 + serial_txx9_ports[port->line].port.flags |= 950 + UPF_BOOT_AUTOCONF | UPF_FIXED_PORT; 932 951 return 0; 933 952 } 934 953 ··· 974 991 uart->port.irq = port->irq; 975 992 uart->port.uartclk = port->uartclk; 976 993 uart->port.iotype = port->iotype; 977 - uart->port.flags = port->flags | UPF_BOOT_AUTOCONF; 994 + uart->port.flags = port->flags 995 + | UPF_BOOT_AUTOCONF | UPF_FIXED_PORT; 978 996 uart->port.mapbase = port->mapbase; 979 997 if (port->dev) 980 998 uart->port.dev = port->dev;