diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-03-03 23:29:00 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-15 16:55:22 -0400 |
commit | 84e819220468e989a0dde33bf1121888c5e749b1 (patch) | |
tree | 65d023d1e1b0715cd243a58fc78135503cac3549 /drivers/tty/serial/serial-tegra.c | |
parent | 19ffd68f816878aed456d5e87697f43bd9e3bd2b (diff) |
serial: tegra: Convert to devm_ioremap_resource()
Use the newly introduced devm_ioremap_resource() instead of
devm_request_and_ioremap() which provides more consistent error handling.
devm_ioremap_resource() provides its own error messages; so all explicit
error messages can be removed from the failure code paths.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
Cc: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/serial-tegra.c')
-rw-r--r-- | drivers/tty/serial/serial-tegra.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/tty/serial/serial-tegra.c b/drivers/tty/serial/serial-tegra.c index 372de8ade76a..9799d043a9bd 100644 --- a/drivers/tty/serial/serial-tegra.c +++ b/drivers/tty/serial/serial-tegra.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/dmaengine.h> | 26 | #include <linux/dmaengine.h> |
27 | #include <linux/dma-mapping.h> | 27 | #include <linux/dma-mapping.h> |
28 | #include <linux/dmapool.h> | 28 | #include <linux/dmapool.h> |
29 | #include <linux/err.h> | ||
29 | #include <linux/io.h> | 30 | #include <linux/io.h> |
30 | #include <linux/irq.h> | 31 | #include <linux/irq.h> |
31 | #include <linux/module.h> | 32 | #include <linux/module.h> |
@@ -1301,11 +1302,9 @@ static int tegra_uart_probe(struct platform_device *pdev) | |||
1301 | } | 1302 | } |
1302 | 1303 | ||
1303 | u->mapbase = resource->start; | 1304 | u->mapbase = resource->start; |
1304 | u->membase = devm_request_and_ioremap(&pdev->dev, resource); | 1305 | u->membase = devm_ioremap_resource(&pdev->dev, resource); |
1305 | if (!u->membase) { | 1306 | if (IS_ERR(u->membase)) |
1306 | dev_err(&pdev->dev, "memregion/iomap address req failed\n"); | 1307 | return PTR_ERR(u->membase); |
1307 | return -EADDRNOTAVAIL; | ||
1308 | } | ||
1309 | 1308 | ||
1310 | tup->uart_clk = devm_clk_get(&pdev->dev, NULL); | 1309 | tup->uart_clk = devm_clk_get(&pdev->dev, NULL); |
1311 | if (IS_ERR(tup->uart_clk)) { | 1310 | if (IS_ERR(tup->uart_clk)) { |