diff options
| author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2013-06-12 16:18:01 -0400 |
|---|---|---|
| committer | Mark Brown <broonie@linaro.org> | 2013-06-13 05:25:52 -0400 |
| commit | d8f4e17fdd4f5e6fe6ef07496296fa88e150beda (patch) | |
| tree | d4c97d192e8961d66d94722ddb4f14e8d45e760e | |
| parent | e58070ee4fdf797c47cb296992ce8db3df715eca (diff) | |
ASoC: SPEAr spdif_{in,out}: fix fallout of previous cleanup
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>
| -rw-r--r-- | sound/soc/spear/spdif_in.c | 10 | ||||
| -rw-r--r-- | sound/soc/spear/spdif_out.c | 12 |
2 files changed, 3 insertions, 19 deletions
diff --git a/sound/soc/spear/spdif_in.c b/sound/soc/spear/spdif_in.c index f0071ddbfa7d..63acfeb4b69d 100644 --- a/sound/soc/spear/spdif_in.c +++ b/sound/soc/spear/spdif_in.c | |||
| @@ -257,20 +257,12 @@ static int spdif_in_probe(struct platform_device *pdev) | |||
| 257 | return ret; | 257 | return ret; |
| 258 | } | 258 | } |
| 259 | 259 | ||
| 260 | ret = snd_soc_register_component(&pdev->dev, &spdif_in_component, | 260 | return snd_soc_register_component(&pdev->dev, &spdif_in_component, |
| 261 | &spdif_in_dai, 1); | 261 | &spdif_in_dai, 1); |
| 262 | if (ret != 0) { | ||
| 263 | clk_put(host->clk); | ||
| 264 | return ret; | ||
| 265 | } | ||
| 266 | |||
| 267 | return 0; | ||
| 268 | } | 262 | } |
| 269 | 263 | ||
| 270 | static int spdif_in_remove(struct platform_device *pdev) | 264 | static int spdif_in_remove(struct platform_device *pdev) |
| 271 | { | 265 | { |
| 272 | struct spdif_in_dev *host = dev_get_drvdata(&pdev->dev); | ||
| 273 | |||
| 274 | snd_soc_unregister_component(&pdev->dev); | 266 | snd_soc_unregister_component(&pdev->dev); |
| 275 | 267 | ||
| 276 | return 0; | 268 | return 0; |
diff --git a/sound/soc/spear/spdif_out.c b/sound/soc/spear/spdif_out.c index 4bde5123cea6..a4a874820ab1 100644 --- a/sound/soc/spear/spdif_out.c +++ b/sound/soc/spear/spdif_out.c | |||
| @@ -298,8 +298,7 @@ static int spdif_out_probe(struct platform_device *pdev) | |||
| 298 | return -ENOMEM; | 298 | return -ENOMEM; |
| 299 | } | 299 | } |
| 300 | 300 | ||
| 301 | host->io_base = devm_request_and_ioremap(&pdev->dev, res->start, | 301 | host->io_base = devm_request_and_ioremap(&pdev->dev, res); |
| 302 | resource_size(res)); | ||
| 303 | if (!host->io_base) { | 302 | if (!host->io_base) { |
| 304 | dev_warn(&pdev->dev, "ioremap failed\n"); | 303 | dev_warn(&pdev->dev, "ioremap failed\n"); |
| 305 | return -ENOMEM; | 304 | return -ENOMEM; |
| @@ -321,18 +320,11 @@ static int spdif_out_probe(struct platform_device *pdev) | |||
| 321 | 320 | ||
| 322 | ret = snd_soc_register_component(&pdev->dev, &spdif_out_component, | 321 | ret = snd_soc_register_component(&pdev->dev, &spdif_out_component, |
| 323 | &spdif_out_dai, 1); | 322 | &spdif_out_dai, 1); |
| 324 | if (ret != 0) { | 323 | return ret; |
| 325 | clk_put(host->clk); | ||
| 326 | return ret; | ||
| 327 | } | ||
| 328 | |||
| 329 | return 0; | ||
| 330 | } | 324 | } |
| 331 | 325 | ||
| 332 | static int spdif_out_remove(struct platform_device *pdev) | 326 | static int spdif_out_remove(struct platform_device *pdev) |
| 333 | { | 327 | { |
| 334 | struct spdif_out_dev *host = dev_get_drvdata(&pdev->dev); | ||
| 335 | |||
| 336 | snd_soc_unregister_component(&pdev->dev); | 328 | snd_soc_unregister_component(&pdev->dev); |
| 337 | 329 | ||
| 338 | return 0; | 330 | return 0; |
