From 41147bfdc5c0d6acb39d2b3b8a4eb6ffb08e4b42 Mon Sep 17 00:00:00 2001 From: Thomas Abraham Date: Tue, 1 Jan 2013 00:21:55 -0800 Subject: [PATCH] serial: samsung: remove the use of statically remapped controller address The address S3C_VA_UART is a statically ioremapped address. The driver should not be using this. Instead, the driver should setup a mapping during probe. Cc: Kukjin Kim Signed-off-by: Thomas Abraham Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/samsung.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c index 12e5249d053e..96ae08f34770 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c @@ -47,7 +47,6 @@ #include #include -#include #include #include @@ -1144,8 +1143,13 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport, dbg("resource %p (%lx..%lx)\n", res, res->start, res->end); + port->membase = devm_ioremap(port->dev, res->start, resource_size(res)); + if (!port->membase) { + dev_err(port->dev, "failed to remap controller address\n"); + return -EBUSY; + } + port->mapbase = res->start; - port->membase = S3C_VA_UART + (res->start & 0xfffff); ret = platform_get_irq(platdev, 0); if (ret < 0) port->irq = 0;