Commit a4005007 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: fsl: 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/87y1cwwv51.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 98e9645a
...@@ -196,7 +196,7 @@ static int eukrea_tlv320_probe(struct platform_device *pdev) ...@@ -196,7 +196,7 @@ static int eukrea_tlv320_probe(struct platform_device *pdev)
} }
} }
ret = snd_soc_register_card(&eukrea_tlv320); ret = devm_snd_soc_register_card(&pdev->dev, &eukrea_tlv320);
err: err:
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);
...@@ -205,11 +205,6 @@ static int eukrea_tlv320_probe(struct platform_device *pdev) ...@@ -205,11 +205,6 @@ static int eukrea_tlv320_probe(struct platform_device *pdev)
return ret; return ret;
} }
static void eukrea_tlv320_remove(struct platform_device *pdev)
{
snd_soc_unregister_card(&eukrea_tlv320);
}
static const struct of_device_id imx_tlv320_dt_ids[] = { static const struct of_device_id imx_tlv320_dt_ids[] = {
{ .compatible = "eukrea,asoc-tlv320"}, { .compatible = "eukrea,asoc-tlv320"},
{ /* sentinel */ } { /* sentinel */ }
...@@ -222,7 +217,6 @@ static struct platform_driver eukrea_tlv320_driver = { ...@@ -222,7 +217,6 @@ static struct platform_driver eukrea_tlv320_driver = {
.of_match_table = imx_tlv320_dt_ids, .of_match_table = imx_tlv320_dt_ids,
}, },
.probe = eukrea_tlv320_probe, .probe = eukrea_tlv320_probe,
.remove_new = eukrea_tlv320_remove,
}; };
module_platform_driver(eukrea_tlv320_driver); module_platform_driver(eukrea_tlv320_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