]> Pileus Git - ~andy/linux/commitdiff
sata_rcar: Convert to devm_ioremap_resource()
authorSachin Kamat <sachin.kamat@linaro.org>
Thu, 4 Apr 2013 09:26:36 +0000 (14:56 +0530)
committerJeff Garzik <jgarzik@redhat.com>
Thu, 11 Apr 2013 23:34:48 +0000 (19:34 -0400)
Use the newly introduced devm_ioremap_resource() instead of
devm_request_and_ioremap() which provides more consistent error handling.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/sata_rcar.c

index caf33f620c354df658b1716ba6cd665cdd4e1dd3..4799868bd7339c40ad863a317e92e2d0ddfffe9a 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/libata.h>
 #include <linux/platform_device.h>
 #include <linux/clk.h>
+#include <linux/err.h>
 
 #define DRV_NAME "sata_rcar"
 
@@ -799,9 +800,9 @@ static int sata_rcar_probe(struct platform_device *pdev)
 
        host->private_data = priv;
 
-       priv->base = devm_request_and_ioremap(&pdev->dev, mem);
-       if (!priv->base) {
-               ret = -EADDRNOTAVAIL;
+       priv->base = devm_ioremap_resource(&pdev->dev, mem);
+       if (IS_ERR(priv->base)) {
+               ret = PTR_ERR(priv->base);
                goto cleanup;
        }