Commit 887e83e3 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown

ASoC: mediatek: Convert to devm_snd_soc_register_card

Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Acked-by: default avatarKoro Chen <koro.chen@mediatek.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 0643558f
......@@ -169,21 +169,13 @@ static int mt8173_max98090_dev_probe(struct platform_device *pdev)
}
card->dev = &pdev->dev;
ret = snd_soc_register_card(card);
ret = devm_snd_soc_register_card(&pdev->dev, card);
if (ret)
dev_err(&pdev->dev, "%s snd_soc_register_card fail %d\n",
__func__, ret);
return ret;
}
static int mt8173_max98090_dev_remove(struct platform_device *pdev)
{
struct snd_soc_card *card = platform_get_drvdata(pdev);
snd_soc_unregister_card(card);
return 0;
}
static const struct of_device_id mt8173_max98090_dt_match[] = {
{ .compatible = "mediatek,mt8173-max98090", },
{ }
......@@ -200,7 +192,6 @@ static struct platform_driver mt8173_max98090_driver = {
#endif
},
.probe = mt8173_max98090_dev_probe,
.remove = mt8173_max98090_dev_remove,
};
module_platform_driver(mt8173_max98090_driver);
......
......@@ -234,21 +234,13 @@ static int mt8173_rt5650_rt5676_dev_probe(struct platform_device *pdev)
card->dev = &pdev->dev;
platform_set_drvdata(pdev, card);
ret = snd_soc_register_card(card);
ret = devm_snd_soc_register_card(&pdev->dev, card);
if (ret)
dev_err(&pdev->dev, "%s snd_soc_register_card fail %d\n",
__func__, ret);
return ret;
}
static int mt8173_rt5650_rt5676_dev_remove(struct platform_device *pdev)
{
struct snd_soc_card *card = platform_get_drvdata(pdev);
snd_soc_unregister_card(card);
return 0;
}
static const struct of_device_id mt8173_rt5650_rt5676_dt_match[] = {
{ .compatible = "mediatek,mt8173-rt5650-rt5676", },
{ }
......@@ -265,7 +257,6 @@ static struct platform_driver mt8173_rt5650_rt5676_driver = {
#endif
},
.probe = mt8173_rt5650_rt5676_dev_probe,
.remove = mt8173_rt5650_rt5676_dev_remove,
};
module_platform_driver(mt8173_rt5650_rt5676_driver);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment