Commit 00352af2 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: atmel: use devm_snd_soc_register_card()

Let's use devm_snd_soc_register_card() instead of snd_soc_register_card()
and ignore snd_soc_unregister_card()
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://msgid.link/r/87wmsgwv4r.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent a4005007
...@@ -140,7 +140,7 @@ static int snd_proto_probe(struct platform_device *pdev) ...@@ -140,7 +140,7 @@ static int snd_proto_probe(struct platform_device *pdev)
dai->dai_fmt = dai_fmt; dai->dai_fmt = dai_fmt;
ret = snd_soc_register_card(&snd_proto); ret = devm_snd_soc_register_card(&pdev->dev, &snd_proto);
if (ret) if (ret)
dev_err_probe(&pdev->dev, ret, dev_err_probe(&pdev->dev, ret,
"snd_soc_register_card() failed\n"); "snd_soc_register_card() failed\n");
...@@ -155,11 +155,6 @@ static int snd_proto_probe(struct platform_device *pdev) ...@@ -155,11 +155,6 @@ static int snd_proto_probe(struct platform_device *pdev)
return ret; return ret;
} }
static void snd_proto_remove(struct platform_device *pdev)
{
snd_soc_unregister_card(&snd_proto);
}
static const struct of_device_id snd_proto_of_match[] = { static const struct of_device_id snd_proto_of_match[] = {
{ .compatible = "mikroe,mikroe-proto", }, { .compatible = "mikroe,mikroe-proto", },
{}, {},
...@@ -172,7 +167,6 @@ static struct platform_driver snd_proto_driver = { ...@@ -172,7 +167,6 @@ static struct platform_driver snd_proto_driver = {
.of_match_table = snd_proto_of_match, .of_match_table = snd_proto_of_match,
}, },
.probe = snd_proto_probe, .probe = snd_proto_probe,
.remove_new = snd_proto_remove,
}; };
module_platform_driver(snd_proto_driver); module_platform_driver(snd_proto_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