lkml.org 
[lkml]   [2013]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] drivers: ata: rcar: use devm_ioremap_resource()
Date
Convert  use of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() which provides more consistent error handling.
This was found with coccinelle.

Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
---
drivers/ata/sata_rcar.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c
index caf33f6..8c51a3a 100644
--- a/drivers/ata/sata_rcar.c
+++ b/drivers/ata/sata_rcar.c
@@ -799,9 +799,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;
}

--
1.7.9.5


\
 
 \ /
  Last update: 2013-04-12 09:21    [W:0.045 / U:0.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site