Skip to content

Commit

Permalink
ASoC: bcm2835-i2s: 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: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Lars-Peter Clausen authored and Mark Brown committed Dec 2, 2013
1 parent c0d38da commit 3990c51
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions sound/soc/bcm/bcm2835-i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ static int bcm2835_i2s_probe(struct platform_device *pdev)
return ret;
}

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

static int bcm2835_i2s_remove(struct platform_device *pdev)
{
snd_dmaengine_pcm_unregister(&pdev->dev);
return 0;
}

static struct platform_driver bcm2835_i2s_driver = {
.probe = bcm2835_i2s_probe,
.remove = bcm2835_i2s_remove,
.driver = {
.name = "bcm2835-i2s",
.owner = THIS_MODULE,
Expand Down

0 comments on commit 3990c51

Please sign in to comment.