Commit d8f4e17f authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Mark Brown

ASoC: SPEAr spdif_{in,out}: fix fallout of previous cleanup

The patch that resulted in

	bfcc74e6 (ASoC: SPEAr spdif_{in,out}: use devm for clk and a few
more cleanups)

was broken and applied on a newer tree than it was created for. So
bfcc74e6 introduced unbalanced clk handling, two warnings about unused
variables and passed 3 arguments to a function only taking 2. This
commit fixes that.
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent e58070ee
...@@ -257,20 +257,12 @@ static int spdif_in_probe(struct platform_device *pdev) ...@@ -257,20 +257,12 @@ static int spdif_in_probe(struct platform_device *pdev)
return ret; return ret;
} }
ret = snd_soc_register_component(&pdev->dev, &spdif_in_component, return snd_soc_register_component(&pdev->dev, &spdif_in_component,
&spdif_in_dai, 1); &spdif_in_dai, 1);
if (ret != 0) {
clk_put(host->clk);
return ret;
}
return 0;
} }
static int spdif_in_remove(struct platform_device *pdev) static int spdif_in_remove(struct platform_device *pdev)
{ {
struct spdif_in_dev *host = dev_get_drvdata(&pdev->dev);
snd_soc_unregister_component(&pdev->dev); snd_soc_unregister_component(&pdev->dev);
return 0; return 0;
......
...@@ -298,8 +298,7 @@ static int spdif_out_probe(struct platform_device *pdev) ...@@ -298,8 +298,7 @@ static int spdif_out_probe(struct platform_device *pdev)
return -ENOMEM; return -ENOMEM;
} }
host->io_base = devm_request_and_ioremap(&pdev->dev, res->start, host->io_base = devm_request_and_ioremap(&pdev->dev, res);
resource_size(res));
if (!host->io_base) { if (!host->io_base) {
dev_warn(&pdev->dev, "ioremap failed\n"); dev_warn(&pdev->dev, "ioremap failed\n");
return -ENOMEM; return -ENOMEM;
...@@ -321,18 +320,11 @@ static int spdif_out_probe(struct platform_device *pdev) ...@@ -321,18 +320,11 @@ static int spdif_out_probe(struct platform_device *pdev)
ret = snd_soc_register_component(&pdev->dev, &spdif_out_component, ret = snd_soc_register_component(&pdev->dev, &spdif_out_component,
&spdif_out_dai, 1); &spdif_out_dai, 1);
if (ret != 0) { return ret;
clk_put(host->clk);
return ret;
}
return 0;
} }
static int spdif_out_remove(struct platform_device *pdev) static int spdif_out_remove(struct platform_device *pdev)
{ {
struct spdif_out_dev *host = dev_get_drvdata(&pdev->dev);
snd_soc_unregister_component(&pdev->dev); snd_soc_unregister_component(&pdev->dev);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment