forked from Minki/linux
ASoC: imx-wm8962: 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:
parent
ff27d9b3d6
commit
eafbae2919
@ -266,7 +266,7 @@ static int imx_wm8962_probe(struct platform_device *pdev)
|
|||||||
data->card.late_probe = imx_wm8962_late_probe;
|
data->card.late_probe = imx_wm8962_late_probe;
|
||||||
data->card.set_bias_level = imx_wm8962_set_bias_level;
|
data->card.set_bias_level = imx_wm8962_set_bias_level;
|
||||||
|
|
||||||
ret = snd_soc_register_card(&data->card);
|
ret = devm_snd_soc_register_card(&pdev->dev, &data->card);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
|
dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
|
||||||
goto clk_fail;
|
goto clk_fail;
|
||||||
@ -296,7 +296,6 @@ static int imx_wm8962_remove(struct platform_device *pdev)
|
|||||||
|
|
||||||
if (!IS_ERR(data->codec_clk))
|
if (!IS_ERR(data->codec_clk))
|
||||||
clk_disable_unprepare(data->codec_clk);
|
clk_disable_unprepare(data->codec_clk);
|
||||||
snd_soc_unregister_card(&data->card);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user