mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 08:40:53 +07:00
ASoC: ep93xx: Use devm_snd_dmaengine_pcm_register()
Makes the code slightly shorter. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
parent
a22f33b003
commit
237eeb1c04
@ -78,19 +78,13 @@ static const struct snd_dmaengine_pcm_config ep93xx_dmaengine_pcm_config = {
|
|||||||
|
|
||||||
static int ep93xx_soc_platform_probe(struct platform_device *pdev)
|
static int ep93xx_soc_platform_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
return snd_dmaengine_pcm_register(&pdev->dev,
|
return devm_snd_dmaengine_pcm_register(&pdev->dev,
|
||||||
&ep93xx_dmaengine_pcm_config,
|
&ep93xx_dmaengine_pcm_config,
|
||||||
SND_DMAENGINE_PCM_FLAG_NO_RESIDUE |
|
SND_DMAENGINE_PCM_FLAG_NO_RESIDUE |
|
||||||
SND_DMAENGINE_PCM_FLAG_NO_DT |
|
SND_DMAENGINE_PCM_FLAG_NO_DT |
|
||||||
SND_DMAENGINE_PCM_FLAG_COMPAT);
|
SND_DMAENGINE_PCM_FLAG_COMPAT);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ep93xx_soc_platform_remove(struct platform_device *pdev)
|
|
||||||
{
|
|
||||||
snd_dmaengine_pcm_unregister(&pdev->dev);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct platform_driver ep93xx_pcm_driver = {
|
static struct platform_driver ep93xx_pcm_driver = {
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "ep93xx-pcm-audio",
|
.name = "ep93xx-pcm-audio",
|
||||||
@ -98,7 +92,6 @@ static struct platform_driver ep93xx_pcm_driver = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
.probe = ep93xx_soc_platform_probe,
|
.probe = ep93xx_soc_platform_probe,
|
||||||
.remove = ep93xx_soc_platform_remove,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
module_platform_driver(ep93xx_pcm_driver);
|
module_platform_driver(ep93xx_pcm_driver);
|
||||||
|
Loading…
Reference in New Issue
Block a user