[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1365627711-17476-1-git-send-email-silviupopescu1990@gmail.com>
Date: Thu, 11 Apr 2013 00:01:51 +0300
From: Silviu-Mihai Popescu <silviupopescu1990@...il.com>
To: linux-mtd@...ts.infradead.org
Cc: David Woodhouse <dwmw2@...radead.org>,
Artem Bityutskiy <artem.bityutskiy@...ux.intel.com>,
Philip Avinash <avinashphilip@...com>,
Peter Korsgaard <jacmet@...site.dk>,
linux-kernel@...r.kernel.org,
Silviu-Mihai Popescu <silviupopescu1990@...il.com>
Subject: [PATCH] drivers: mtd: devices: convert to devm_ioremap_resource()
Convert all uses 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@...il.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 2ec5da9..2bafb06 100644
--- a/drivers/mtd/devices/elm.c
+++ b/drivers/mtd/devices/elm.c
@@ -344,9 +344,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);
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists