mtd: devices: convert OMAP BCH to devm_ioremap_resource()

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Mon Aug 5 16:59:02 EDT 2013


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=435796889d714ffaf90923cfea868d8b5d28008c
Commit:     435796889d714ffaf90923cfea868d8b5d28008c
Parent:     975aefc9de7ab893e9e784ec52cf97e1827259da
Author:     Silviu-Mihai Popescu <silviupopescu1990 at gmail.com>
AuthorDate: Thu Apr 11 00:01:51 2013 +0300
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Mon Aug 5 19:09:16 2013 +0100

    mtd: devices: convert OMAP BCH to devm_ioremap_resource()
    
    Convert all users of devm_request_and_ioremap() to the newly introduced
    devm_ioremap_resource() which provides more consistent error handling.
    
    Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990 at gmail.com>
    Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/devices/elm.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/devices/elm.c b/drivers/mtd/devices/elm.c
index dccef9f..fc8ad9f 100644
--- a/drivers/mtd/devices/elm.c
+++ b/drivers/mtd/devices/elm.c
@@ -351,9 +351,9 @@ static int elm_probe(struct platform_device *pdev)
 		return -ENODEV;
 	}
 
-	info->elm_base = devm_request_and_ioremap(&pdev->dev, res);
-	if (!info->elm_base)
-		return -EADDRNOTAVAIL;
+	info->elm_base = devm_ioremap_resource(&pdev->dev, res);
+	if (IS_ERR(info->elm_base))
+		return PTR_ERR(info->elm_base);
 
 	ret = devm_request_irq(&pdev->dev, irq->start, elm_isr, 0,
 			pdev->name, info);



More information about the linux-mtd-cvs mailing list