Skip to content

Commit

Permalink
sata_rcar: Convert to devm_ioremap_resource()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sachin Kamat authored and Jeff Garzik committed Apr 11, 2013
1 parent 7551c40 commit 2de1d5e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/ata/sata_rcar.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 2de1d5e

Please sign in to comment.