diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-21 11:09:21 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-22 11:41:57 -0800 |
commit | eb612fa013ca07b954300fa46b1499248cedf926 (patch) | |
tree | 7e9ccbd2ccce4c20426b51617fd91271c2238056 | |
parent | 97f4be60178fec663baaa30a09ae102fd33373c2 (diff) | |
download | talos-op-linux-eb612fa013ca07b954300fa46b1499248cedf926.tar.gz talos-op-linux-eb612fa013ca07b954300fa46b1499248cedf926.zip |
serial: Convert to devm_ioremap_resource()
Convert all uses of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() 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: Thierry Reding <thierry.reding@avionic-design.de>
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/tty/serial/sccnxp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/tty/serial/sccnxp.c b/drivers/tty/serial/sccnxp.c index 418b495e3233..e869eab180be 100644 --- a/drivers/tty/serial/sccnxp.c +++ b/drivers/tty/serial/sccnxp.c @@ -15,6 +15,7 @@ #define SUPPORT_SYSRQ #endif +#include <linux/err.h> #include <linux/module.h> #include <linux/device.h> #include <linux/console.h> @@ -875,10 +876,9 @@ static int sccnxp_probe(struct platform_device *pdev) goto err_out; } - membase = devm_request_and_ioremap(&pdev->dev, res); - if (!membase) { - dev_err(&pdev->dev, "Failed to ioremap\n"); - ret = -EIO; + membase = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(membase)) { + ret = PTR_ERR(membase); goto err_out; } |