aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/memory/emif.c
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@avionic-design.de>2013-01-21 05:09:08 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-22 14:41:56 -0500
commit06303c2e00701724acb95069ca46f87c998c4be1 (patch)
tree62f3c4a6ba59355eb29a9f5b5a67dc12c85d1751 /drivers/memory/emif.c
parent8d1cbc98838b252af68204780bb0bfac4fe850ec (diff)
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 <thierry.reding@avionic-design.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/memory/emif.c')
-rw-r--r--drivers/memory/emif.c8
1 files changed, 3 insertions, 5 deletions
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 @@
10 * it under the terms of the GNU General Public License version 2 as 10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
12 */ 12 */
13#include <linux/err.h>
13#include <linux/kernel.h> 14#include <linux/kernel.h>
14#include <linux/reboot.h> 15#include <linux/reboot.h>
15#include <linux/platform_data/emif_plat.h> 16#include <linux/platform_data/emif_plat.h>
@@ -1468,12 +1469,9 @@ static int __init_or_module emif_probe(struct platform_device *pdev)
1468 goto error; 1469 goto error;
1469 } 1470 }
1470 1471
1471 emif->base = devm_request_and_ioremap(emif->dev, res); 1472 emif->base = devm_ioremap_resource(emif->dev, res);
1472 if (!emif->base) { 1473 if (IS_ERR(emif->base))
1473 dev_err(emif->dev, "%s: devm_request_and_ioremap() failed\n",
1474 __func__);
1475 goto error; 1474 goto error;
1476 }
1477 1475
1478 irq = platform_get_irq(pdev, 0); 1476 irq = platform_get_irq(pdev, 0);
1479 if (irq < 0) { 1477 if (irq < 0) {