diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-04-03 07:23:00 +0100 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2013-05-22 22:18:22 +0100 |
commit | c619653d77a5d59abe9166da57f3686b7f067745 (patch) | |
tree | ff2c1f5dee4bc03ee43e4002caeb8d20480ad6f5 /drivers/iio | |
parent | 39441078f76cf6733364f16e5c5b645c83de3c6e (diff) | |
download | linux-c619653d77a5d59abe9166da57f3686b7f067745.tar.gz linux-c619653d77a5d59abe9166da57f3686b7f067745.tar.bz2 linux-c619653d77a5d59abe9166da57f3686b7f067745.zip |
adc: exynos_adc: Convert to devm_ioremap_resource()
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>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/adc/exynos_adc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c index 9f3a8ef1fb3e..22d034a55a62 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; } |