Skip to contentSkip to conversation

ASoC: fsl-sai: Use devm_snd_dmaengine_pcm_register()

PATCH Applied Xiubo Li 2 participants 2 messages Dec 20, 2013 – Dec 21, 2013

Subsystems (3)
lore
Share & tools
lore

Xiubo Li

author
#0 lore raw

PATCH 1/1 ASoC: fsl-sai: Use devm_snd_dmaengine_pcm_register()

Makes the code slightly shorter

---
 sound/soc/fsl/fsl_sai.c | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)
sound/soc/fsl/fsl_sai.c +1 -14
index 50a797e..39cb9ee 100644
@@ -454,19 +454,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[] = {
@@ -476,8 +465,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,
Signature · 1 line
1.8.4
maintainer Applied
#1 lore raw
Quoted 1 line · Xiubo Li

Makes the code slightly shorter

Applied, thanks.