diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-09-17 00:12:47 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-09-19 09:57:37 -0400 |
commit | ff27d9b3d6dd26013537e4f8162627169ca92af4 (patch) | |
tree | 7e3141daafce80f4de7ee56e6f8e7412c4e0551b | |
parent | 01984a47e21a7d36cea0d6c0933c8173391721fc (diff) |
ASoC: imx-spdif: Use devm_snd_soc_register_card
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>
-rw-r--r-- | sound/soc/fsl/imx-spdif.c | 4 |
1 files changed, 1 insertions, 3 deletions
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) | |||
87 | if (ret) | 87 | if (ret) |
88 | goto error_dir; | 88 | goto error_dir; |
89 | 89 | ||
90 | ret = snd_soc_register_card(&data->card); | 90 | ret = devm_snd_soc_register_card(&pdev->dev, &data->card); |
91 | if (ret) { | 91 | if (ret) { |
92 | dev_err(&pdev->dev, "snd_soc_register_card failed: %d\n", ret); | 92 | dev_err(&pdev->dev, "snd_soc_register_card failed: %d\n", ret); |
93 | goto error_dir; | 93 | goto error_dir; |
@@ -119,8 +119,6 @@ static int imx_spdif_audio_remove(struct platform_device *pdev) | |||
119 | if (data->txdev) | 119 | if (data->txdev) |
120 | platform_device_unregister(data->txdev); | 120 | platform_device_unregister(data->txdev); |
121 | 121 | ||
122 | snd_soc_unregister_card(&data->card); | ||
123 | |||
124 | return 0; | 122 | return 0; |
125 | } | 123 | } |
126 | 124 | ||