summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2013-11-28 08:50:32 +0100
committerNitin Garg <nitin.garg@freescale.com>2014-04-16 08:57:36 -0500
commit48e3262d32ccf673031aaf4723abba0395531403 (patch)
tree318d8f71ad4cbb1c88fb7a443b6352922755150d /include
parentd6903613de39557719382416a8f38c67e331e88d (diff)
ASoC: Add resource managed snd_dmaengine_pcm_register()
For many drivers using the generic dmaengine PCM driver one of the few (or the only) things left to do in the drivers remove function is to unregister the PCM device. This patch adds a resource managed version of snd_dmaengine_pcm_register() which makes it possible to simplify the remove function as well as the error path in the probe function for those drivers. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit 21585ee848078b12d0d1a513e93936bf96b444a0) Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Diffstat (limited to 'include')
-rw-r--r--include/sound/dmaengine_pcm.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/sound/dmaengine_pcm.h b/include/sound/dmaengine_pcm.h
index f11c35cd5532..a4735fadf48d 100644
--- a/include/sound/dmaengine_pcm.h
+++ b/include/sound/dmaengine_pcm.h
@@ -132,6 +132,10 @@ int snd_dmaengine_pcm_register(struct device *dev,
unsigned int flags);
void snd_dmaengine_pcm_unregister(struct device *dev);
+int devm_snd_dmaengine_pcm_register(struct device *dev,
+ const struct snd_dmaengine_pcm_config *config,
+ unsigned int flags);
+
int snd_dmaengine_pcm_prepare_slave_config(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct dma_slave_config *slave_config);