[PATCH] serial_txx9: Use UPF_FIXED_PORT

Previous thread: [RFC][PATCH 1/2 -mm] kexec based hibernation -v3: kexec jump by Huang, Ying on Thursday, September 20, 2007 - 1:34 am. (55 messages)

Next thread: [PATCH 1/2][resend 2] gpio_keys: add gpio_to_irq return code check by Anti Sullin on Thursday, September 20, 2007 - 3:01 am. (1 message)
To: <linux-kernel@...>
Cc: <akpm@...>, <ralf@...>, <linux-serial@...>
Date: Thursday, September 20, 2007 - 1:45 am

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>
---
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 0930e2a..c25c9a5 100644
--- a/drivers/serial/serial_txx9.c
+++ b/drivers/serial/serial_txx9.c
@@ -37,7 +37,7 @@

#include <asm/io.h>

-static char *serial_version = "1.10";
+static char *serial_version = "1.11";
static char *serial_name = "TX39/49 Serial driver";

#define PASS_LIMIT 256
@@ -68,8 +68,6 @@ static char *serial_name = "TX39/49 Serial driver";
*/
#define UART_NR CONFIG_SERIAL_TXX9_NR_UARTS

-#define HIGH_BITS_OFFSET ((sizeof(long)-sizeof(int))*8)
-
struct uart_txx9_port {
struct uart_port port;
/* No additional info for now */
@@ -756,21 +754,6 @@ static void serial_txx9_config_port(struct uart_port *port, int uflags)
serial_txx9_initialize(port);
}

-static int
-serial_txx9_verify_port(struct uart_port *port, struct serial_struct *ser)
-{
- unsigned long new_port = ser->port;
- if (HIGH_BITS_OFFSET)
- new_port += (unsigned long)ser->port_high << HIGH_BITS_OFFSET;
- if (ser->type != port->type ||
- ser->irq != port->irq ||
- ser->io_type != port->iotype ||
- new_port != port->iobase ||
- (unsigned long)ser->iomem_base != port->mapbase)
- return -EINVAL;
- return 0;
-}
-
static const char *
serial_txx9_type(struct uart_port *port)
{
@@ -794,7 +777,6 @@ static struct uart_ops serial_txx9_pops = {
.release_port = serial_txx9_release_port,
.request_port = serial_txx9_request_port,
.config_port = serial_txx9_config_port,
- .verify_port = serial_txx9_verify_port,
};

static struct uart_txx9_port serial_txx9_ports[UART_NR];
@@ -950,7 +932,8 @@ int __init early_serial_txx9_setup(struct...

Previous thread: [RFC][PATCH 1/2 -mm] kexec based hibernation -v3: kexec jump by Huang, Ying on Thursday, September 20, 2007 - 1:34 am. (55 messages)

Next thread: [PATCH 1/2][resend 2] gpio_keys: add gpio_to_irq return code check by Anti Sullin on Thursday, September 20, 2007 - 3:01 am. (1 message)