// SPDX-License-Identifier: GPL-2.0+ // // soc-devres.c -- ALSA SoC Audio Layer devres functions // // Copyright (C) 2013 Linaro Ltd #include <linux/module.h> #include <linux/moduleparam.h> #include <sound/soc.h> #include <sound/dmaengine_pcm.h> static void devm_dai_release(struct device *dev, void *res) { … } /** * devm_snd_soc_register_dai - resource-managed dai registration * @dev: Device used to manage component * @component: The component the DAIs are registered for * @dai_drv: DAI driver to use for the DAI * @legacy_dai_naming: if %true, use legacy single-name format; * if %false, use multiple-name format; */ struct snd_soc_dai *devm_snd_soc_register_dai(struct device *dev, struct snd_soc_component *component, struct snd_soc_dai_driver *dai_drv, bool legacy_dai_naming) { … } EXPORT_SYMBOL_GPL(…); static void devm_component_release(struct device *dev, void *res) { … } /** * devm_snd_soc_register_component - resource managed component registration * @dev: Device used to manage component * @cmpnt_drv: Component driver * @dai_drv: DAI driver * @num_dai: Number of DAIs to register * * Register a component with automatic unregistration when the device is * unregistered. */ int devm_snd_soc_register_component(struct device *dev, const struct snd_soc_component_driver *cmpnt_drv, struct snd_soc_dai_driver *dai_drv, int num_dai) { … } EXPORT_SYMBOL_GPL(…); static void devm_card_release(struct device *dev, void *res) { … } /** * devm_snd_soc_register_card - resource managed card registration * @dev: Device used to manage card * @card: Card to register * * Register a card with automatic unregistration when the device is * unregistered. */ int devm_snd_soc_register_card(struct device *dev, struct snd_soc_card *card) { … } EXPORT_SYMBOL_GPL(…); #ifdef CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM static void devm_dmaengine_pcm_release(struct device *dev, void *res) { … } /** * devm_snd_dmaengine_pcm_register - resource managed dmaengine PCM registration * @dev: The parent device for the PCM device * @config: Platform specific PCM configuration * @flags: Platform specific quirks * * Register a dmaengine based PCM device with automatic unregistration when the * device is unregistered. */ int devm_snd_dmaengine_pcm_register(struct device *dev, const struct snd_dmaengine_pcm_config *config, unsigned int flags) { … } EXPORT_SYMBOL_GPL(…); #endif