diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2013-11-28 02:50:36 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-11-28 08:36:16 -0500 |
commit | d71b3ef44f9e5cfda2499768f6420b784845af06 (patch) | |
tree | cbd327bfaf8a7fd88a9294e4273b081b67e6c9a7 | |
parent | 21585ee848078b12d0d1a513e93936bf96b444a0 (diff) |
ASoC: spear: Use devm_snd_dmaengine_pcm_register
Makes the code slightly shorter.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Rajeev Kumar <rajeev-dlh.kumar@st.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | sound/soc/spear/spear_pcm.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/sound/soc/spear/spear_pcm.c b/sound/soc/spear/spear_pcm.c index 4707f2b862c3..9a02141666ea 100644 --- a/sound/soc/spear/spear_pcm.c +++ b/sound/soc/spear/spear_pcm.c | |||
@@ -49,18 +49,12 @@ static const struct snd_dmaengine_pcm_config spear_dmaengine_pcm_config = { | |||
49 | 49 | ||
50 | static int spear_soc_platform_probe(struct platform_device *pdev) | 50 | static int spear_soc_platform_probe(struct platform_device *pdev) |
51 | { | 51 | { |
52 | return snd_dmaengine_pcm_register(&pdev->dev, | 52 | return devm_snd_dmaengine_pcm_register(&pdev->dev, |
53 | &spear_dmaengine_pcm_config, | 53 | &spear_dmaengine_pcm_config, |
54 | SND_DMAENGINE_PCM_FLAG_NO_DT | | 54 | SND_DMAENGINE_PCM_FLAG_NO_DT | |
55 | SND_DMAENGINE_PCM_FLAG_COMPAT); | 55 | SND_DMAENGINE_PCM_FLAG_COMPAT); |
56 | } | 56 | } |
57 | 57 | ||
58 | static int spear_soc_platform_remove(struct platform_device *pdev) | ||
59 | { | ||
60 | snd_dmaengine_pcm_unregister(&pdev->dev); | ||
61 | return 0; | ||
62 | } | ||
63 | |||
64 | static struct platform_driver spear_pcm_driver = { | 58 | static struct platform_driver spear_pcm_driver = { |
65 | .driver = { | 59 | .driver = { |
66 | .name = "spear-pcm-audio", | 60 | .name = "spear-pcm-audio", |
@@ -68,7 +62,6 @@ static struct platform_driver spear_pcm_driver = { | |||
68 | }, | 62 | }, |
69 | 63 | ||
70 | .probe = spear_soc_platform_probe, | 64 | .probe = spear_soc_platform_probe, |
71 | .remove = spear_soc_platform_remove, | ||
72 | }; | 65 | }; |
73 | 66 | ||
74 | module_platform_driver(spear_pcm_driver); | 67 | module_platform_driver(spear_pcm_driver); |