From 06303c2e00701724acb95069ca46f87c998c4be1 Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Mon, 21 Jan 2013 11:09:08 +0100 Subject: memory: 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 Signed-off-by: Greg Kroah-Hartman --- drivers/memory/emif.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'drivers/memory/emif.c') diff --git a/drivers/memory/emif.c b/drivers/memory/emif.c index 06d31c99e6ac..df0873694858 100644 --- a/drivers/memory/emif.c +++ b/drivers/memory/emif.c @@ -10,6 +10,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include #include #include #include @@ -1468,12 +1469,9 @@ static int __init_or_module emif_probe(struct platform_device *pdev) goto error; } - emif->base = devm_request_and_ioremap(emif->dev, res); - if (!emif->base) { - dev_err(emif->dev, "%s: devm_request_and_ioremap() failed\n", - __func__); + emif->base = devm_ioremap_resource(emif->dev, res); + if (IS_ERR(emif->base)) goto error; - } irq = platform_get_irq(pdev, 0); if (irq < 0) { -- cgit v1.2.3