]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ASoC: imx-spdif: Use devm_snd_soc_register_card
authorSachin Kamat <sachin.kamat@linaro.org>
Tue, 17 Sep 2013 04:12:47 +0000 (09:42 +0530)
committerMark Brown <broonie@linaro.org>
Thu, 19 Sep 2013 13:57:37 +0000 (14:57 +0100)
devm_snd_soc_register_card makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/fsl/imx-spdif.c

index 816013b0ebba4f0b16e3fdfddd0e763833d1ee39..8499d5292f088a45e9ea736106ee2db13e7d205a 100644 (file)
@@ -87,7 +87,7 @@ static int imx_spdif_audio_probe(struct platform_device *pdev)
        if (ret)
                goto error_dir;
 
-       ret = snd_soc_register_card(&data->card);
+       ret = devm_snd_soc_register_card(&pdev->dev, &data->card);
        if (ret) {
                dev_err(&pdev->dev, "snd_soc_register_card failed: %d\n", ret);
                goto error_dir;
@@ -119,8 +119,6 @@ static int imx_spdif_audio_remove(struct platform_device *pdev)
        if (data->txdev)
                platform_device_unregister(data->txdev);
 
-       snd_soc_unregister_card(&data->card);
-
        return 0;
 }