ASoC: SPEAr spdif_{in,out}: fix fallout of previous cleanup
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Wed, 12 Jun 2013 20:18:01 +0000 (22:18 +0200)
committerMark Brown <broonie@linaro.org>
Thu, 13 Jun 2013 09:25:52 +0000 (10:25 +0100)
The patch that resulted in

bfcc74e (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
bfcc74e 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: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/spear/spdif_in.c
sound/soc/spear/spdif_out.c

index f0071ddbfa7df313fa31b96cb5af2c71b0cc6e25..63acfeb4b69d22e91ab9e98cf81d7fbf9ef4cc04 100644 (file)
@@ -257,20 +257,12 @@ static int spdif_in_probe(struct platform_device *pdev)
                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);
-       if (ret != 0) {
-               clk_put(host->clk);
-               return ret;
-       }
-
-       return 0;
 }
 
 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);
 
        return 0;
index 4bde5123cea64f51164f80885b3b2447dd96c247..a4a874820ab1e5dbcc37df1457b232ee8eb8793e 100644 (file)
@@ -298,8 +298,7 @@ static int spdif_out_probe(struct platform_device *pdev)
                return -ENOMEM;
        }
 
-       host->io_base = devm_request_and_ioremap(&pdev->dev, res->start,
-                               resource_size(res));
+       host->io_base = devm_request_and_ioremap(&pdev->dev, res);
        if (!host->io_base) {
                dev_warn(&pdev->dev, "ioremap failed\n");
                return -ENOMEM;
@@ -321,18 +320,11 @@ static int spdif_out_probe(struct platform_device *pdev)
 
        ret = snd_soc_register_component(&pdev->dev, &spdif_out_component,
                                         &spdif_out_dai, 1);
-       if (ret != 0) {
-               clk_put(host->clk);
-               return ret;
-       }
-
-       return 0;
+       return ret;
 }
 
 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);
 
        return 0;