[libata] Convert to devm_ioremap_resource()
authorThierry Reding <thierry.reding@avionic-design.de>
Mon, 21 Jan 2013 10:08:58 +0000 (11:08 +0100)
committerJeff Garzik <jgarzik@redhat.com>
Wed, 20 Feb 2013 22:13:10 +0000 (17:13 -0500)
Convert all uses of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() which provides more consistent error handling.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Cc: linux-ide@vger.kernel.org
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/pata_ep93xx.c

index 556222f04731ea7326afdaaac3a0ccedf3cc5e10..c1bfaf43d109119e5f47d709365f91c5c170c656 100644 (file)
@@ -31,6 +31,7 @@
  *   Copyright (C) 2006 Tower Technologies
  */
 
+#include <linux/err.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/init.h>
@@ -937,9 +938,9 @@ static int ep93xx_pata_probe(struct platform_device *pdev)
                goto err_rel_gpio;
        }
 
-       ide_base = devm_request_and_ioremap(&pdev->dev, mem_res);
-       if (!ide_base) {
-               err = -ENXIO;
+       ide_base = devm_ioremap_resource(&pdev->dev, mem_res);
+       if (IS_ERR(ide_base)) {
+               err = PTR_ERR(ide_base);
                goto err_rel_gpio;
        }