diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2014-04-16 15:46:11 +0300 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2015-09-17 08:58:13 -0500 |
commit | 332fd400053f1ee5854961abb91738a5396597e4 (patch) | |
tree | 5742b76b376d905e5da99a1eff56be18cf8e3ca8 /include/sound | |
parent | 0561936f53f03caf749878ead51f7e9c30619d29 (diff) |
ASoC: Add resource managed snd_soc_register_platform()
Simplify error handling and remove repetitive (and rarely executed) code
for unregistration by providing a devm_snd_soc_register_platform()
platform.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit 8931bf6208776292b1b888dd8534229f63e2eaa2)
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/soc.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h index c4be7ab89399..59a47851f5c8 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -383,6 +383,8 @@ int snd_soc_resume(struct device *dev); int snd_soc_poweroff(struct device *dev); int snd_soc_register_platform(struct device *dev, const struct snd_soc_platform_driver *platform_drv); +int devm_snd_soc_register_platform(struct device *dev, + const struct snd_soc_platform_driver *platform_drv); void snd_soc_unregister_platform(struct device *dev); int snd_soc_add_platform(struct device *dev, struct snd_soc_platform *platform, const struct snd_soc_platform_driver *platform_drv); |