mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-03-06 03:32:05 +00:00
ASoC: SPEAr spdif_in: Use devm_snd_soc_register_component
devm_snd_soc_register_component makes code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
parent
272b98c645
commit
5fb7680bd0
@ -257,20 +257,12 @@ static int spdif_in_probe(struct platform_device *pdev)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
return snd_soc_register_component(&pdev->dev, &spdif_in_component,
|
return devm_snd_soc_register_component(&pdev->dev, &spdif_in_component,
|
||||||
&spdif_in_dai, 1);
|
&spdif_in_dai, 1);
|
||||||
}
|
|
||||||
|
|
||||||
static int spdif_in_remove(struct platform_device *pdev)
|
|
||||||
{
|
|
||||||
snd_soc_unregister_component(&pdev->dev);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct platform_driver spdif_in_driver = {
|
static struct platform_driver spdif_in_driver = {
|
||||||
.probe = spdif_in_probe,
|
.probe = spdif_in_probe,
|
||||||
.remove = spdif_in_remove,
|
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "spdif-in",
|
.name = "spdif-in",
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user