Merge tag 'for-linus-20130301' of git://git.infradead.org/linux-mtd
[linux-3.10.git] / drivers / mtd / nand / mxc_nand.c
index 20e1241..07e5784 100644 (file)
@@ -1448,9 +1448,9 @@ static int mxcnd_probe(struct platform_device *pdev)
                res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
                if (!res)
                        return -ENODEV;
-               host->regs_ip = devm_request_and_ioremap(&pdev->dev, res);
-               if (!host->regs_ip)
-                       return -ENOMEM;
+               host->regs_ip = devm_ioremap_resource(&pdev->dev, res);
+               if (IS_ERR(host->regs_ip))
+                       return PTR_ERR(host->regs_ip);
 
                res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
        } else {
@@ -1460,9 +1460,9 @@ static int mxcnd_probe(struct platform_device *pdev)
        if (!res)
                return -ENODEV;
 
-       host->base = devm_request_and_ioremap(&pdev->dev, res);
-       if (!host->base)
-               return -ENOMEM;
+       host->base = devm_ioremap_resource(&pdev->dev, res);
+       if (IS_ERR(host->base))
+               return PTR_ERR(host->base);
 
        host->main_area0 = host->base;