Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: soc-devres: Remove unused devm_snd_soc_register_dai

The last use of devm_snd_soc_register_dai() was removed by
commit fc4cb1e15f0c ("ASoC: topology: Properly unregister DAI on removal")
in 2021.

Remove it, and the helper it used.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Link: https://patch.msgid.link/20241028021226.477909-1-linux@treblig.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Dr. David Alan Gilbert and committed by
Mark Brown
dea15b2a 20079dd9

-41
-4
include/sound/soc.h
··· 1438 1438 struct snd_soc_dai *snd_soc_register_dai(struct snd_soc_component *component, 1439 1439 struct snd_soc_dai_driver *dai_drv, 1440 1440 bool legacy_dai_naming); 1441 - struct snd_soc_dai *devm_snd_soc_register_dai(struct device *dev, 1442 - struct snd_soc_component *component, 1443 - struct snd_soc_dai_driver *dai_drv, 1444 - bool legacy_dai_naming); 1445 1441 void snd_soc_unregister_dai(struct snd_soc_dai *dai); 1446 1442 1447 1443 struct snd_soc_dai *snd_soc_find_dai(
-37
sound/soc/soc-devres.c
··· 9 9 #include <sound/soc.h> 10 10 #include <sound/dmaengine_pcm.h> 11 11 12 - static void devm_dai_release(struct device *dev, void *res) 13 - { 14 - snd_soc_unregister_dai(*(struct snd_soc_dai **)res); 15 - } 16 - 17 - /** 18 - * devm_snd_soc_register_dai - resource-managed dai registration 19 - * @dev: Device used to manage component 20 - * @component: The component the DAIs are registered for 21 - * @dai_drv: DAI driver to use for the DAI 22 - * @legacy_dai_naming: if %true, use legacy single-name format; 23 - * if %false, use multiple-name format; 24 - */ 25 - struct snd_soc_dai *devm_snd_soc_register_dai(struct device *dev, 26 - struct snd_soc_component *component, 27 - struct snd_soc_dai_driver *dai_drv, 28 - bool legacy_dai_naming) 29 - { 30 - struct snd_soc_dai **ptr; 31 - struct snd_soc_dai *dai; 32 - 33 - ptr = devres_alloc(devm_dai_release, sizeof(*ptr), GFP_KERNEL); 34 - if (!ptr) 35 - return NULL; 36 - 37 - dai = snd_soc_register_dai(component, dai_drv, legacy_dai_naming); 38 - if (dai) { 39 - *ptr = dai; 40 - devres_add(dev, ptr); 41 - } else { 42 - devres_free(ptr); 43 - } 44 - 45 - return dai; 46 - } 47 - EXPORT_SYMBOL_GPL(devm_snd_soc_register_dai); 48 - 49 12 static void devm_component_release(struct device *dev, void *res) 50 13 { 51 14 const struct snd_soc_component_driver **cmpnt_drv = res;