Skip to content

Commit

Permalink
ASoC: spear: Use devm_snd_dmaengine_pcm_register
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lars-Peter Clausen authored and Mark Brown committed Nov 28, 2013
1 parent 21585ee commit d71b3ef
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions sound/soc/spear/spear_pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,26 +49,19 @@ static const struct snd_dmaengine_pcm_config spear_dmaengine_pcm_config = {

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,
SND_DMAENGINE_PCM_FLAG_NO_DT |
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 = {
.driver = {
.name = "spear-pcm-audio",
.owner = THIS_MODULE,
},

.probe = spear_soc_platform_probe,
.remove = spear_soc_platform_remove,
};

module_platform_driver(spear_pcm_driver);
Expand Down

0 comments on commit d71b3ef

Please sign in to comment.