ASoC: fsl-sai: Use devm_snd_dmaengine_pcm_register()
authorXiubo Li <Li.Xiubo@freescale.com>
Fri, 20 Dec 2013 04:30:26 +0000 (12:30 +0800)
committerMark Brown <broonie@linaro.org>
Sat, 21 Dec 2013 14:33:10 +0000 (14:33 +0000)
Makes the code slightly shorter

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/fsl/fsl_sai.c

index 1868ec34be108b6c2a3e8c9baf4b26c0a1b61876..262d3107892e0c05326266df8d26472fbbafe8c9 100644 (file)
@@ -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[] = {
@@ -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,