提交 e5180df3 编写于 作者: X Xiubo Li 提交者: Mark Brown

ASoC: fsl-sai: Use devm_snd_dmaengine_pcm_register()

Makes the code slightly shorter
Signed-off-by: NXiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: NMark Brown <broonie@linaro.org>
上级 a6af47ae
...@@ -443,19 +443,8 @@ static int fsl_sai_probe(struct platform_device *pdev) ...@@ -443,19 +443,8 @@ static int fsl_sai_probe(struct platform_device *pdev)
if (ret) if (ret)
return 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); 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[] = { static const struct of_device_id fsl_sai_ids[] = {
...@@ -465,8 +454,6 @@ 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 = { static struct platform_driver fsl_sai_driver = {
.probe = fsl_sai_probe, .probe = fsl_sai_probe,
.remove = fsl_sai_remove,
.driver = { .driver = {
.name = "fsl-sai", .name = "fsl-sai",
.owner = THIS_MODULE, .owner = THIS_MODULE,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册