mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
ASoC: mxs-sgtl5000: Convert to devm_snd_soc_register_card
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
6ff33f3902
commit
5b73de19fd
@ -142,7 +142,7 @@ static int mxs_sgtl5000_probe(struct platform_device *pdev)
|
|||||||
card->dev = &pdev->dev;
|
card->dev = &pdev->dev;
|
||||||
platform_set_drvdata(pdev, card);
|
platform_set_drvdata(pdev, card);
|
||||||
|
|
||||||
ret = snd_soc_register_card(card);
|
ret = devm_snd_soc_register_card(&pdev->dev, card);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n",
|
dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n",
|
||||||
ret);
|
ret);
|
||||||
@ -154,12 +154,8 @@ static int mxs_sgtl5000_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
static int mxs_sgtl5000_remove(struct platform_device *pdev)
|
static int mxs_sgtl5000_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct snd_soc_card *card = platform_get_drvdata(pdev);
|
|
||||||
|
|
||||||
mxs_saif_put_mclk(0);
|
mxs_saif_put_mclk(0);
|
||||||
|
|
||||||
snd_soc_unregister_card(card);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user