diff options
author | Tushar Behera <tushar.behera@linaro.org> | 2014-05-21 03:22:19 (GMT) |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-05-21 23:20:11 (GMT) |
commit | 7253e354e712d2cab7b640c62c8bb82653447c44 (patch) | |
tree | ef95602d86ec3ba29060f7bbd45cfc7808ab545f /sound/soc/samsung/spdif.c | |
parent | 55313bd3b09b68ce28e328e9dde79bfc389ea921 (diff) | |
download | linux-7253e354e712d2cab7b640c62c8bb82653447c44.tar.xz |
ASoC: samsung: Use devm_snd_soc_register_component
Replaced snd_soc_register_component with its devres equivalent,
devm_snd_soc_register_component.
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/samsung/spdif.c')
-rw-r--r-- | sound/soc/samsung/spdif.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sound/soc/samsung/spdif.c b/sound/soc/samsung/spdif.c index 7d89d01..e93a93e 100644 --- a/sound/soc/samsung/spdif.c +++ b/sound/soc/samsung/spdif.c @@ -427,8 +427,8 @@ static int spdif_probe(struct platform_device *pdev) dev_set_drvdata(&pdev->dev, spdif); - ret = snd_soc_register_component(&pdev->dev, &samsung_spdif_component, - &samsung_spdif_dai, 1); + ret = devm_snd_soc_register_component(&pdev->dev, + &samsung_spdif_component, &samsung_spdif_dai, 1); if (ret != 0) { dev_err(&pdev->dev, "fail to register dai\n"); goto err4; @@ -444,12 +444,10 @@ static int spdif_probe(struct platform_device *pdev) ret = samsung_asoc_dma_platform_register(&pdev->dev); if (ret) { dev_err(&pdev->dev, "failed to register DMA: %d\n", ret); - goto err5; + goto err4; } return 0; -err5: - snd_soc_unregister_component(&pdev->dev); err4: iounmap(spdif->regs); err3: @@ -467,8 +465,6 @@ static int spdif_remove(struct platform_device *pdev) struct samsung_spdif_info *spdif = &spdif_info; struct resource *mem_res; - snd_soc_unregister_component(&pdev->dev); - iounmap(spdif->regs); mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |