diff options
author | Tushar Behera <tushar.behera@linaro.org> | 2014-05-21 07:22:19 +0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-05-22 03:20:11 +0400 |
commit | 7253e354e712d2cab7b640c62c8bb82653447c44 (patch) | |
tree | ef95602d86ec3ba29060f7bbd45cfc7808ab545f /sound/soc/samsung/ac97.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/ac97.c')
-rw-r--r-- | sound/soc/samsung/ac97.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sound/soc/samsung/ac97.c b/sound/soc/samsung/ac97.c index fbce03bbdb2b..68d9303047e8 100644 --- a/sound/soc/samsung/ac97.c +++ b/sound/soc/samsung/ac97.c @@ -433,7 +433,7 @@ static int s3c_ac97_probe(struct platform_device *pdev) goto err4; } - ret = snd_soc_register_component(&pdev->dev, &s3c_ac97_component, + ret = devm_snd_soc_register_component(&pdev->dev, &s3c_ac97_component, s3c_ac97_dai, ARRAY_SIZE(s3c_ac97_dai)); if (ret) goto err5; @@ -441,12 +441,10 @@ static int s3c_ac97_probe(struct platform_device *pdev) ret = samsung_asoc_dma_platform_register(&pdev->dev); if (ret) { dev_err(&pdev->dev, "failed to get register DMA: %d\n", ret); - goto err6; + goto err5; } return 0; -err6: - snd_soc_unregister_component(&pdev->dev); err5: free_irq(irq_res->start, NULL); err4: @@ -461,8 +459,6 @@ static int s3c_ac97_remove(struct platform_device *pdev) { struct resource *irq_res; - snd_soc_unregister_component(&pdev->dev); - irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); if (irq_res) free_irq(irq_res->start, NULL); |