Skip to content

Commit

Permalink
ASoC: fsl-sai: 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: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Xiubo Li authored and Mark Brown committed Dec 21, 2013
1 parent a6af47a commit e5180df
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions sound/soc/fsl/fsl_sai.c
Original file line number Diff line number Diff line change
Expand Up @@ -443,19 +443,8 @@ static int fsl_sai_probe(struct platform_device *pdev)
if (ret)
return ret;

ret = snd_dmaengine_pcm_register(&pdev->dev, NULL,
return devm_snd_dmaengine_pcm_register(&pdev->dev, NULL,
SND_DMAENGINE_PCM_FLAG_NO_RESIDUE);
if (ret)
return ret;

return 0;
}

static int fsl_sai_remove(struct platform_device *pdev)
{
snd_dmaengine_pcm_unregister(&pdev->dev);

return 0;
}

static const struct of_device_id fsl_sai_ids[] = {
Expand All @@ -465,8 +454,6 @@ static const struct of_device_id fsl_sai_ids[] = {

static struct platform_driver fsl_sai_driver = {
.probe = fsl_sai_probe,
.remove = fsl_sai_remove,

.driver = {
.name = "fsl-sai",
.owner = THIS_MODULE,
Expand Down

0 comments on commit e5180df

Please sign in to comment.