From: Sachin Kamat Date: Tue, 17 Sep 2013 04:12:47 +0000 (+0530) Subject: ASoC: imx-spdif: Use devm_snd_soc_register_card X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ff27d9b3d6dd26013537e4f8162627169ca92af4;p=linux-beck.git ASoC: imx-spdif: Use devm_snd_soc_register_card devm_snd_soc_register_card makes code simpler. Signed-off-by: Sachin Kamat Signed-off-by: Mark Brown --- diff --git a/sound/soc/fsl/imx-spdif.c b/sound/soc/fsl/imx-spdif.c index 816013b0ebba..8499d5292f08 100644 --- a/sound/soc/fsl/imx-spdif.c +++ b/sound/soc/fsl/imx-spdif.c @@ -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; }