diff options
author | Thierry Reding | 2013-01-21 11:09:26 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2013-01-22 11:41:58 -0800 |
commit | b25b5aa06667b01fee8fe2648d4ea9db32c87d1a (patch) | |
tree | 9d6ec95d418fce9bc5923d6c7f3e2ab8bf8ada72 /sound/soc/fsl | |
parent | 4d6dc3a73543336be8d81ba748772c09730cf557 (diff) |
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/fsl')
-rw-r--r-- | sound/soc/fsl/imx-audmux.c | 6 | ||||
-rw-r--r-- | sound/soc/fsl/imx-ssi.c | 7 |
2 files changed, 6 insertions, 7 deletions
diff --git a/sound/soc/fsl/imx-audmux.c b/sound/soc/fsl/imx-audmux.c index 251f4d981e0c..c21ac9c7081e 100644 --- a/sound/soc/fsl/imx-audmux.c +++ b/sound/soc/fsl/imx-audmux.c @@ -252,9 +252,9 @@ static int imx_audmux_probe(struct platform_device *pdev) of_match_device(imx_audmux_dt_ids, &pdev->dev); res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - audmux_base = devm_request_and_ioremap(&pdev->dev, res); - if (!audmux_base) - return -EADDRNOTAVAIL; + audmux_base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(audmux_base)) + return PTR_ERR(audmux_base); pinctrl = devm_pinctrl_get_select_default(&pdev->dev); if (IS_ERR(pinctrl)) { diff --git a/sound/soc/fsl/imx-ssi.c b/sound/soc/fsl/imx-ssi.c index 3b480423747f..55464a5b0706 100644 --- a/sound/soc/fsl/imx-ssi.c +++ b/sound/soc/fsl/imx-ssi.c @@ -550,10 +550,9 @@ static int imx_ssi_probe(struct platform_device *pdev) goto failed_get_resource; } - ssi->base = devm_request_and_ioremap(&pdev->dev, res); - if (!ssi->base) { - dev_err(&pdev->dev, "ioremap failed\n"); - ret = -ENODEV; + ssi->base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(ssi->base)) { + ret = PTR_ERR(ssi->base); goto failed_register; } |