aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/spear/spdif_in.c10
-rw-r--r--sound/soc/spear/spdif_out.c12
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
270static int spdif_in_remove(struct platform_device *pdev) 264static 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
332static int spdif_out_remove(struct platform_device *pdev) 326static 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;