]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mtd: devices: convert OMAP BCH to devm_ioremap_resource()
authorSilviu-Mihai Popescu <silviupopescu1990@gmail.com>
Wed, 10 Apr 2013 21:01:51 +0000 (00:01 +0300)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 5 Aug 2013 18:09:16 +0000 (19:09 +0100)
Convert all users of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() which provides more consistent error handling.

Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/devices/elm.c

index dccef9fdc1f276269566bcc4ba03ae6e7a87111d..fc8ad9f13910c5ce06361d32c0c16a2c1165254d 100644 (file)
@@ -351,9 +351,9 @@ static int elm_probe(struct platform_device *pdev)
                return -ENODEV;
        }
 
-       info->elm_base = devm_request_and_ioremap(&pdev->dev, res);
-       if (!info->elm_base)
-               return -EADDRNOTAVAIL;
+       info->elm_base = devm_ioremap_resource(&pdev->dev, res);
+       if (IS_ERR(info->elm_base))
+               return PTR_ERR(info->elm_base);
 
        ret = devm_request_irq(&pdev->dev, irq->start, elm_isr, 0,
                        pdev->name, info);