Skip to content

Commit 3990c51

Browse files
larsclausenbroonie
authored andcommitted
ASoC: bcm2835-i2s: Use devm_snd_dmaengine_pcm_register()
Makes the code slightly shorter. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
1 parent c0d38da commit 3990c51

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

‎sound/soc/bcm/bcm2835-i2s.c‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,7 @@ static int bcm2835_i2s_probe(struct platform_device *pdev)
848848
return ret;
849849
}
850850

851-
ret = snd_dmaengine_pcm_register(&pdev->dev, NULL, 0);
851+
ret = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0);
852852
if (ret) {
853853
dev_err(&pdev->dev, "Could not register PCM: %d\n", ret);
854854
return ret;
@@ -862,15 +862,8 @@ static const struct of_device_id bcm2835_i2s_of_match[] = {
862862
{},
863863
};
864864

865-
static int bcm2835_i2s_remove(struct platform_device *pdev)
866-
{
867-
snd_dmaengine_pcm_unregister(&pdev->dev);
868-
return 0;
869-
}
870-
871865
static struct platform_driver bcm2835_i2s_driver = {
872866
.probe = bcm2835_i2s_probe,
873-
.remove = bcm2835_i2s_remove,
874867
.driver = {
875868
.name = "bcm2835-i2s",
876869
.owner = THIS_MODULE,

0 commit comments

Comments
 (0)