mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-15 21:21:49 -04:00
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>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user