]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
ASoC: soc-devres: Remove unused devm_snd_soc_register_dai
authorDr. David Alan Gilbert <linux@treblig.org>
Mon, 28 Oct 2024 02:12:26 +0000 (02:12 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 28 Oct 2024 12:23:27 +0000 (12:23 +0000)
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>
include/sound/soc.h
sound/soc/soc-devres.c

index 3e72317e2c20f16f5377cddbe0bbd48920f10aeb..5c240ea340276a42c06c1e493c84c7b7f3d5fc81 100644 (file)
@@ -1438,10 +1438,6 @@ struct snd_soc_dai *snd_soc_get_dai_via_args(const struct of_phandle_args *dai_a
 struct snd_soc_dai *snd_soc_register_dai(struct snd_soc_component *component,
                                         struct snd_soc_dai_driver *dai_drv,
                                         bool legacy_dai_naming);
-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);
 void snd_soc_unregister_dai(struct snd_soc_dai *dai);
 
 struct snd_soc_dai *snd_soc_find_dai(
index 4534a1c03e8e5e85f9f5e4e889197edd88652649..c6364caabc0ec54d3583a28715095da1db774669 100644 (file)
@@ -9,43 +9,6 @@
 #include <sound/soc.h>
 #include <sound/dmaengine_pcm.h>
 
-static void devm_dai_release(struct device *dev, void *res)
-{
-       snd_soc_unregister_dai(*(struct snd_soc_dai **)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)
-{
-       struct snd_soc_dai **ptr;
-       struct snd_soc_dai *dai;
-
-       ptr = devres_alloc(devm_dai_release, sizeof(*ptr), GFP_KERNEL);
-       if (!ptr)
-               return NULL;
-
-       dai = snd_soc_register_dai(component, dai_drv, legacy_dai_naming);
-       if (dai) {
-               *ptr = dai;
-               devres_add(dev, ptr);
-       } else {
-               devres_free(ptr);
-       }
-
-       return dai;
-}
-EXPORT_SYMBOL_GPL(devm_snd_soc_register_dai);
-
 static void devm_component_release(struct device *dev, void *res)
 {
        const struct snd_soc_component_driver **cmpnt_drv = res;