diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-21 11:09:26 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-22 20:41:58 +0100 |
commit | b25b5aa06667b01fee8fe2648d4ea9db32c87d1a (patch) | |
tree | 9d6ec95d418fce9bc5923d6c7f3e2ab8bf8ada72 /sound/soc/cirrus | |
parent | w1: Convert to devm_ioremap_resource() (diff) | |
download | linux-b25b5aa06667b01fee8fe2648d4ea9db32c87d1a.tar.xz linux-b25b5aa06667b01fee8fe2648d4ea9db32c87d1a.zip |
ASoC: 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.
devm_ioremap_resource() provides its own error messages so all explicit
error messages can be removed from the failure code paths.
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Liam Girdwood <lrg@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/soc/cirrus')
-rw-r--r-- | sound/soc/cirrus/ep93xx-ac97.c | 7 | ||||
-rw-r--r-- | sound/soc/cirrus/ep93xx-i2s.c | 6 |
2 files changed, 7 insertions, 6 deletions
diff --git a/sound/soc/cirrus/ep93xx-ac97.c b/sound/soc/cirrus/ep93xx-ac97.c index f3f50e6fd6eb..1738d28fb04f 100644 --- a/sound/soc/cirrus/ep93xx-ac97.c +++ b/sound/soc/cirrus/ep93xx-ac97.c @@ -11,6 +11,7 @@ */ #include <linux/delay.h> +#include <linux/err.h> #include <linux/io.h> #include <linux/init.h> #include <linux/module.h> @@ -367,9 +368,9 @@ static int ep93xx_ac97_probe(struct platform_device *pdev) if (!res) return -ENODEV; - info->regs = devm_request_and_ioremap(&pdev->dev, res); - if (!info->regs) - return -ENXIO; + info->regs = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(info->regs)) + return PTR_ERR(info->regs); irq = platform_get_irq(pdev, 0); if (!irq) diff --git a/sound/soc/cirrus/ep93xx-i2s.c b/sound/soc/cirrus/ep93xx-i2s.c index 3365d4e843b7..323ed69b7975 100644 --- a/sound/soc/cirrus/ep93xx-i2s.c +++ b/sound/soc/cirrus/ep93xx-i2s.c @@ -380,9 +380,9 @@ static int ep93xx_i2s_probe(struct platform_device *pdev) if (!res) return -ENODEV; - info->regs = devm_request_and_ioremap(&pdev->dev, res); - if (!info->regs) - return -ENXIO; + info->regs = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(info->regs)) + return PTR_ERR(info->regs); info->mclk = clk_get(&pdev->dev, "mclk"); if (IS_ERR(info->mclk)) { |