diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2007-10-16 04:24:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 12:42:50 -0400 |
commit | 37a6c7d0096bb54daa2cf3cc66a66bdbb57cb204 (patch) | |
tree | dcd513ca2957ba58fc68584613e2c45bee835308 /drivers/serial | |
parent | b3b708fa2780cd2b5d8266a8f0c3a1cab364d4d2 (diff) |
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>
Diffstat (limited to 'drivers/serial')
-rw-r--r-- | drivers/serial/serial_txx9.c | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/drivers/serial/serial_txx9.c b/drivers/serial/serial_txx9.c index be2ba06cc9e0..6846a6c38b6d 100644 --- a/drivers/serial/serial_txx9.c +++ b/drivers/serial/serial_txx9.c | |||
@@ -33,7 +33,7 @@ | |||
33 | 33 | ||
34 | #include <asm/io.h> | 34 | #include <asm/io.h> |
35 | 35 | ||
36 | static char *serial_version = "1.10"; | 36 | static char *serial_version = "1.11"; |
37 | static char *serial_name = "TX39/49 Serial driver"; | 37 | static char *serial_name = "TX39/49 Serial driver"; |
38 | 38 | ||
39 | #define PASS_LIMIT 256 | 39 | #define PASS_LIMIT 256 |
@@ -64,8 +64,6 @@ static char *serial_name = "TX39/49 Serial driver"; | |||
64 | */ | 64 | */ |
65 | #define UART_NR CONFIG_SERIAL_TXX9_NR_UARTS | 65 | #define UART_NR CONFIG_SERIAL_TXX9_NR_UARTS |
66 | 66 | ||
67 | #define HIGH_BITS_OFFSET ((sizeof(long)-sizeof(int))*8) | ||
68 | |||
69 | struct uart_txx9_port { | 67 | struct uart_txx9_port { |
70 | struct uart_port port; | 68 | struct uart_port port; |
71 | /* No additional info for now */ | 69 | /* No additional info for now */ |
@@ -752,21 +750,6 @@ static void serial_txx9_config_port(struct uart_port *port, int uflags) | |||
752 | serial_txx9_initialize(port); | 750 | serial_txx9_initialize(port); |
753 | } | 751 | } |
754 | 752 | ||
755 | static int | ||
756 | serial_txx9_verify_port(struct uart_port *port, struct serial_struct *ser) | ||
757 | { | ||
758 | unsigned long new_port = ser->port; | ||
759 | if (HIGH_BITS_OFFSET) | ||
760 | new_port += (unsigned long)ser->port_high << HIGH_BITS_OFFSET; | ||
761 | if (ser->type != port->type || | ||
762 | ser->irq != port->irq || | ||
763 | ser->io_type != port->iotype || | ||
764 | new_port != port->iobase || | ||
765 | (unsigned long)ser->iomem_base != port->mapbase) | ||
766 | return -EINVAL; | ||
767 | return 0; | ||
768 | } | ||
769 | |||
770 | static const char * | 753 | static const char * |
771 | serial_txx9_type(struct uart_port *port) | 754 | serial_txx9_type(struct uart_port *port) |
772 | { | 755 | { |
@@ -790,7 +773,6 @@ static struct uart_ops serial_txx9_pops = { | |||
790 | .release_port = serial_txx9_release_port, | 773 | .release_port = serial_txx9_release_port, |
791 | .request_port = serial_txx9_request_port, | 774 | .request_port = serial_txx9_request_port, |
792 | .config_port = serial_txx9_config_port, | 775 | .config_port = serial_txx9_config_port, |
793 | .verify_port = serial_txx9_verify_port, | ||
794 | }; | 776 | }; |
795 | 777 | ||
796 | static struct uart_txx9_port serial_txx9_ports[UART_NR]; | 778 | static struct uart_txx9_port serial_txx9_ports[UART_NR]; |
@@ -946,7 +928,8 @@ int __init early_serial_txx9_setup(struct uart_port *port) | |||
946 | 928 | ||
947 | serial_txx9_ports[port->line].port = *port; | 929 | serial_txx9_ports[port->line].port = *port; |
948 | serial_txx9_ports[port->line].port.ops = &serial_txx9_pops; | 930 | serial_txx9_ports[port->line].port.ops = &serial_txx9_pops; |
949 | serial_txx9_ports[port->line].port.flags |= UPF_BOOT_AUTOCONF; | 931 | serial_txx9_ports[port->line].port.flags |= |
932 | UPF_BOOT_AUTOCONF | UPF_FIXED_PORT; | ||
950 | return 0; | 933 | return 0; |
951 | } | 934 | } |
952 | 935 | ||
@@ -991,7 +974,8 @@ static int __devinit serial_txx9_register_port(struct uart_port *port) | |||
991 | uart->port.irq = port->irq; | 974 | uart->port.irq = port->irq; |
992 | uart->port.uartclk = port->uartclk; | 975 | uart->port.uartclk = port->uartclk; |
993 | uart->port.iotype = port->iotype; | 976 | uart->port.iotype = port->iotype; |
994 | uart->port.flags = port->flags | UPF_BOOT_AUTOCONF; | 977 | uart->port.flags = port->flags |
978 | | UPF_BOOT_AUTOCONF | UPF_FIXED_PORT; | ||
995 | uart->port.mapbase = port->mapbase; | 979 | uart->port.mapbase = port->mapbase; |
996 | if (port->dev) | 980 | if (port->dev) |
997 | uart->port.dev = port->dev; | 981 | uart->port.dev = port->dev; |