[PATCH v3 10/27] tty: replace devm_ioremap_nocache with devm_ioremap

From: Yisheng Xie
Date: Sat Dec 23 2017 - 06:08:07 EST


Default ioremap is ioremap_nocache, so devm_ioremap has the same
function with devm_ioremap_nocache, which can just be killed to
save the size of devres.o

This patch is to use use devm_ioremap instead of devm_ioremap_nocache,
which should not have any function change but prepare for killing
devm_ioremap_nocache.

Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: Jiri Slaby <jslaby@xxxxxxxx>
Signed-off-by: Yisheng Xie <xieyisheng1@xxxxxxxxxx>
---
drivers/tty/mips_ejtag_fdc.c | 4 ++--
drivers/tty/serial/8250/8250_omap.c | 3 +--
drivers/tty/serial/lantiq.c | 3 +--
drivers/tty/serial/meson_uart.c | 3 +--
drivers/tty/serial/owl-uart.c | 2 +-
drivers/tty/serial/pic32_uart.c | 4 ++--
6 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/drivers/tty/mips_ejtag_fdc.c b/drivers/tty/mips_ejtag_fdc.c
index 4c1cd49..cf3da1f 100644
--- a/drivers/tty/mips_ejtag_fdc.c
+++ b/drivers/tty/mips_ejtag_fdc.c
@@ -898,8 +898,8 @@ static int mips_ejtag_fdc_tty_probe(struct mips_cdmm_device *dev)
atomic_set(&priv->xmit_total, 0);
raw_spin_lock_init(&priv->lock);

- priv->reg = devm_ioremap_nocache(priv->dev, dev->res.start,
- resource_size(&dev->res));
+ priv->reg = devm_ioremap(priv->dev, dev->res.start,
+ resource_size(&dev->res));
if (!priv->reg) {
dev_err(priv->dev, "ioremap failed for resource %pR\n",
&dev->res);
diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c
index bd40ba4..72c0994 100644
--- a/drivers/tty/serial/8250/8250_omap.c
+++ b/drivers/tty/serial/8250/8250_omap.c
@@ -1133,8 +1133,7 @@ static int omap8250_probe(struct platform_device *pdev)
if (!priv)
return -ENOMEM;

- membase = devm_ioremap_nocache(&pdev->dev, regs->start,
- resource_size(regs));
+ membase = devm_ioremap(&pdev->dev, regs->start, resource_size(regs));
if (!membase)
return -ENODEV;

diff --git a/drivers/tty/serial/lantiq.c b/drivers/tty/serial/lantiq.c
index 0441282..dc1d63d 100644
--- a/drivers/tty/serial/lantiq.c
+++ b/drivers/tty/serial/lantiq.c
@@ -514,8 +514,7 @@ ltq_uart_port *to_ltq_uart_port(struct uart_port *port)
}

if (port->flags & UPF_IOREMAP) {
- port->membase = devm_ioremap_nocache(&pdev->dev,
- port->mapbase, size);
+ port->membase = devm_ioremap(&pdev->dev, port->mapbase, size);
if (port->membase == NULL)
return -ENOMEM;
}
diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c
index daafe60..2c34337 100644
--- a/drivers/tty/serial/meson_uart.c
+++ b/drivers/tty/serial/meson_uart.c
@@ -413,8 +413,7 @@ static int meson_uart_request_port(struct uart_port *port)
return -EBUSY;
}

- port->membase = devm_ioremap_nocache(port->dev, port->mapbase,
- port->mapsize);
+ port->membase = devm_ioremap(port->dev, port->mapbase, port->mapsize);
if (!port->membase)
return -ENOMEM;

diff --git a/drivers/tty/serial/owl-uart.c b/drivers/tty/serial/owl-uart.c
index 29a6dc6..2150e6a 100644
--- a/drivers/tty/serial/owl-uart.c
+++ b/drivers/tty/serial/owl-uart.c
@@ -427,7 +427,7 @@ static int owl_uart_request_port(struct uart_port *port)
return -EBUSY;

if (port->flags & UPF_IOREMAP) {
- port->membase = devm_ioremap_nocache(port->dev, port->mapbase,
+ port->membase = devm_ioremap(port->dev, port->mapbase,
resource_size(res));
if (!port->membase)
return -EBUSY;
diff --git a/drivers/tty/serial/pic32_uart.c b/drivers/tty/serial/pic32_uart.c
index fd80d99..929bd3c 100644
--- a/drivers/tty/serial/pic32_uart.c
+++ b/drivers/tty/serial/pic32_uart.c
@@ -618,8 +618,8 @@ static int pic32_uart_request_port(struct uart_port *port)
"pic32_uart_mem"))
return -EBUSY;

- port->membase = devm_ioremap_nocache(port->dev, port->mapbase,
- resource_size(res_mem));
+ port->membase = devm_ioremap(port->dev, port->mapbase,
+ resource_size(res_mem));
if (!port->membase) {
dev_err(port->dev, "Unable to map registers\n");
release_mem_region(port->mapbase, resource_size(res_mem));
--
1.8.3.1