summaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2013-04-04 14:56:36 +0530
committerJeff Garzik <jgarzik@redhat.com>2013-04-11 19:34:48 -0400
commit2de1d5e159ccf317a9285a0dfaa6e4262500d7dd (patch)
tree58a23dbcc4f03f7e10c5e2cdc75753eb40167124 /drivers/ata
parent7551c40d908b2f6c08eb13571be1f9cfd7228689 (diff)
downloadop-kernel-dev-2de1d5e159ccf317a9285a0dfaa6e4262500d7dd.zip
op-kernel-dev-2de1d5e159ccf317a9285a0dfaa6e4262500d7dd.tar.gz
sata_rcar: Convert to devm_ioremap_resource()
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>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/sata_rcar.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c
index caf33f6..4799868 100644
--- a/drivers/ata/sata_rcar.c
+++ b/drivers/ata/sata_rcar.c
@@ -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;
}
OpenPOWER on IntegriCloud