projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6e3360c
)
ASoC: sun4i-i2s: Switch to devm for PCM register
author
Maxime Ripard
<maxime.ripard@bootlin.com>
Mon, 19 Aug 2019 19:25:09 +0000
(21:25 +0200)
committer
Mark Brown
<broonie@kernel.org>
Tue, 20 Aug 2019 17:23:23 +0000
(18:23 +0100)
Since the introduction of the driver, a new managed helper for the
dmaengine PCM registration has been created. Let's use it to simplify a bit
our probe and remove functions.
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link:
https://lore.kernel.org/r/606d271187091e858e8c15e20555af0b79798fe1.1566242458.git-series.maxime.ripard@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sunxi/sun4i-i2s.c
patch
|
blob
|
history
diff --git
a/sound/soc/sunxi/sun4i-i2s.c
b/sound/soc/sunxi/sun4i-i2s.c
index d97d694c48dfed0dc0be92c6de5170d34ce4cdd8..70608fa30bf20a1d7758a7ec631dd101cc6db812 100644
(file)
--- a/
sound/soc/sunxi/sun4i-i2s.c
+++ b/
sound/soc/sunxi/sun4i-i2s.c
@@
-1154,7
+1154,7
@@
static int sun4i_i2s_probe(struct platform_device *pdev)
goto err_suspend;
}
- 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\n");
goto err_suspend;
@@
-1183,8
+1183,6
@@
static int sun4i_i2s_remove(struct platform_device *pdev)
{
struct sun4i_i2s *i2s = dev_get_drvdata(&pdev->dev);
- snd_dmaengine_pcm_unregister(&pdev->dev);
-
pm_runtime_disable(&pdev->dev);
if (!pm_runtime_status_suspended(&pdev->dev))
sun4i_i2s_runtime_suspend(&pdev->dev);