All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] adc: exynos_adc: Convert to devm_ioremap_resource()
@ 2013-04-03  6:23 Sachin Kamat
  2013-04-03  6:23 ` [PATCH 2/2] adc: exynos_adc: Fix incorrect variable type Sachin Kamat
  2013-04-15  8:22 ` [PATCH 1/2] adc: exynos_adc: Convert to devm_ioremap_resource() Sachin Kamat
  0 siblings, 2 replies; 11+ messages in thread
From: Sachin Kamat @ 2013-04-03  6:23 UTC (permalink / raw)
  To: linux-iio; +Cc: jic23, jic23, ch.naveen, sachin.kamat, patches

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>
---
 drivers/iio/adc/exynos_adc.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c
index 9f3a8ef..22d034a 100644
--- a/drivers/iio/adc/exynos_adc.c
+++ b/drivers/iio/adc/exynos_adc.c
@@ -270,16 +270,16 @@ static int exynos_adc_probe(struct platform_device *pdev)
 	info = iio_priv(indio_dev);
 
 	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	info->regs = devm_request_and_ioremap(&pdev->dev, mem);
-	if (!info->regs) {
-		ret = -ENOMEM;
+	info->regs = devm_ioremap_resource(&pdev->dev, mem);
+	if (IS_ERR(info->regs)) {
+		ret = PTR_ERR(info->regs);
 		goto err_iio;
 	}
 
 	mem = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-	info->enable_reg = devm_request_and_ioremap(&pdev->dev, mem);
-	if (!info->enable_reg) {
-		ret = -ENOMEM;
+	info->enable_reg = devm_ioremap_resource(&pdev->dev, mem);
+	if (IS_ERR(info->enable_reg)) {
+		ret = PTR_ERR(info->enable_reg);
 		goto err_iio;
 	}
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-05-22 21:19 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-03  6:23 [PATCH 1/2] adc: exynos_adc: Convert to devm_ioremap_resource() Sachin Kamat
2013-04-03  6:23 ` [PATCH 2/2] adc: exynos_adc: Fix incorrect variable type Sachin Kamat
2013-04-03 17:27   ` Naveen Krishna Ch
2013-04-04  3:35     ` Sachin Kamat
2013-04-15  8:22 ` [PATCH 1/2] adc: exynos_adc: Convert to devm_ioremap_resource() Sachin Kamat
2013-04-15 10:46   ` Jonathan Cameron
2013-04-15 11:07     ` Sachin Kamat
2013-04-29 17:18     ` Sachin Kamat
2013-04-29 18:27       ` Lars-Peter Clausen
2013-04-30  2:59         ` Sachin Kamat
2013-05-22 21:19           ` Jonathan Cameron

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.