[PATCH] serial_core:stop updating mapbase in uart_set_info()

From: Jiang Lu
Date: Wed Mar 09 2016 - 23:51:54 EST


Stop updating mapbase with iomem_base in uart_set_info().

Signed-off-by: Jiang Lu <lu.jiang@xxxxxxxxxxxxx>
---
drivers/tty/serial/serial_core.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index a5d545e..cda9f9e 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -747,7 +747,6 @@ static int uart_set_info(struct tty_struct *tty, struct tty_port *port,
*/
change_port = !(uport->flags & UPF_FIXED_PORT)
&& (new_port != uport->iobase ||
- (unsigned long)new_info->iomem_base != uport->mapbase ||
new_info->hub6 != uport->hub6 ||
new_info->io_type != uport->iotype ||
new_info->iomem_reg_shift != uport->regshift ||
@@ -803,11 +802,10 @@ static int uart_set_info(struct tty_struct *tty, struct tty_port *port,
}

if (change_port) {
- unsigned long old_iobase, old_mapbase;
+ unsigned long old_iobase;
unsigned int old_type, old_iotype, old_hub6, old_shift;

old_iobase = uport->iobase;
- old_mapbase = uport->mapbase;
old_type = uport->type;
old_hub6 = uport->hub6;
old_iotype = uport->iotype;
@@ -824,7 +822,6 @@ static int uart_set_info(struct tty_struct *tty, struct tty_port *port,
uport->hub6 = new_info->hub6;
uport->iotype = new_info->io_type;
uport->regshift = new_info->iomem_reg_shift;
- uport->mapbase = (unsigned long)new_info->iomem_base;

/*
* Claim and map the new regions
@@ -846,7 +843,6 @@ static int uart_set_info(struct tty_struct *tty, struct tty_port *port,
uport->hub6 = old_hub6;
uport->iotype = old_iotype;
uport->regshift = old_shift;
- uport->mapbase = old_mapbase;

if (old_type != PORT_UNKNOWN) {
retval = uport->ops->request_port(uport);
--
1.9.1


--------------040500070609010803030101--