ASoC: spear: Use devm_snd_dmaengine_pcm_register
Makes the code slightly shorter. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Rajeev Kumar <rajeev-dlh.kumar@st.com> Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
parent
21585ee848
commit
d71b3ef44f
|
@ -49,18 +49,12 @@ static const struct snd_dmaengine_pcm_config spear_dmaengine_pcm_config = {
|
||||||
|
|
||||||
static int spear_soc_platform_probe(struct platform_device *pdev)
|
static int spear_soc_platform_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
return snd_dmaengine_pcm_register(&pdev->dev,
|
return devm_snd_dmaengine_pcm_register(&pdev->dev,
|
||||||
&spear_dmaengine_pcm_config,
|
&spear_dmaengine_pcm_config,
|
||||||
SND_DMAENGINE_PCM_FLAG_NO_DT |
|
SND_DMAENGINE_PCM_FLAG_NO_DT |
|
||||||
SND_DMAENGINE_PCM_FLAG_COMPAT);
|
SND_DMAENGINE_PCM_FLAG_COMPAT);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int spear_soc_platform_remove(struct platform_device *pdev)
|
|
||||||
{
|
|
||||||
snd_dmaengine_pcm_unregister(&pdev->dev);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct platform_driver spear_pcm_driver = {
|
static struct platform_driver spear_pcm_driver = {
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "spear-pcm-audio",
|
.name = "spear-pcm-audio",
|
||||||
|
@ -68,7 +62,6 @@ static struct platform_driver spear_pcm_driver = {
|
||||||
},
|
},
|
||||||
|
|
||||||
.probe = spear_soc_platform_probe,
|
.probe = spear_soc_platform_probe,
|
||||||
.remove = spear_soc_platform_remove,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
module_platform_driver(spear_pcm_driver);
|
module_platform_driver(spear_pcm_driver);
|
||||||
|
|
Loading…
Reference in a new issue