diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-03-04 14:24:39 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-15 13:55:23 -0700 |
commit | 82b231323e419dcd61de9ff38d66dd7e82564594 (patch) | |
tree | f9cdd854f679c5875acec04e785cf610430cd649 | |
parent | 84e819220468e989a0dde33bf1121888c5e749b1 (diff) | |
download | linux-stable-82b231323e419dcd61de9ff38d66dd7e82564594.tar.gz linux-stable-82b231323e419dcd61de9ff38d66dd7e82564594.tar.bz2 linux-stable-82b231323e419dcd61de9ff38d66dd7e82564594.zip |
serial: vt8500_serial: Convert to devm_ioremap_resource()
Use the newly introduced devm_ioremap_resource() instead of
devm_request_and_ioremap() which provides more consistent error handling.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Tony Prisk <linux@prisktech.co.nz>
Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/tty/serial/vt8500_serial.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/tty/serial/vt8500_serial.c b/drivers/tty/serial/vt8500_serial.c index a3f9dd5c9dff..f15f53f18ca9 100644 --- a/drivers/tty/serial/vt8500_serial.c +++ b/drivers/tty/serial/vt8500_serial.c @@ -35,6 +35,7 @@ #include <linux/clk.h> #include <linux/platform_device.h> #include <linux/of.h> +#include <linux/err.h> /* * UART Register offsets @@ -585,9 +586,9 @@ static int vt8500_serial_probe(struct platform_device *pdev) if (!vt8500_port) return -ENOMEM; - vt8500_port->uart.membase = devm_request_and_ioremap(&pdev->dev, mmres); - if (!vt8500_port->uart.membase) - return -EADDRNOTAVAIL; + vt8500_port->uart.membase = devm_ioremap_resource(&pdev->dev, mmres); + if (IS_ERR(vt8500_port->uart.membase)) + return PTR_ERR(vt8500_port->uart.membase); vt8500_port->clk = of_clk_get(pdev->dev.of_node, 0); if (IS_ERR(vt8500_port->clk)) { |