diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2014-04-16 12:46:11 (GMT) |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-04-18 16:59:59 (GMT) |
commit | 8931bf6208776292b1b888dd8534229f63e2eaa2 (patch) | |
tree | f84ca5386a8cf40d361fd22a6c820a94a3066675 /include/sound | |
parent | c9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (diff) | |
download | linux-8931bf6208776292b1b888dd8534229f63e2eaa2.tar.xz |
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>
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 0b83168..34c34d6 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -377,6 +377,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); |