Commit 82b23132 authored by Sachin Kamat's avatar Sachin Kamat Committed by Greg Kroah-Hartman

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: default avatarSachin Kamat <sachin.kamat@linaro.org>
Acked-by: default avatarTony Prisk <linux@prisktech.co.nz>
Reviewed-by: default avatarThierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 84e81922
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/err.h>
/* /*
* UART Register offsets * UART Register offsets
...@@ -585,9 +586,9 @@ static int vt8500_serial_probe(struct platform_device *pdev) ...@@ -585,9 +586,9 @@ static int vt8500_serial_probe(struct platform_device *pdev)
if (!vt8500_port) if (!vt8500_port)
return -ENOMEM; return -ENOMEM;
vt8500_port->uart.membase = devm_request_and_ioremap(&pdev->dev, mmres); vt8500_port->uart.membase = devm_ioremap_resource(&pdev->dev, mmres);
if (!vt8500_port->uart.membase) if (IS_ERR(vt8500_port->uart.membase))
return -EADDRNOTAVAIL; return PTR_ERR(vt8500_port->uart.membase);
vt8500_port->clk = of_clk_get(pdev->dev.of_node, 0); vt8500_port->clk = of_clk_get(pdev->dev.of_node, 0);
if (IS_ERR(vt8500_port->clk)) { if (IS_ERR(vt8500_port->clk)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment