include/sound/soc.h | 4 ---- sound/soc/soc-devres.c | 37 ------------------------------------- 2 files changed, 41 deletions(-)
From: "Dr. David Alan Gilbert" <linux@treblig.org>
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>
---
include/sound/soc.h | 4 ----
sound/soc/soc-devres.c | 37 -------------------------------------
2 files changed, 41 deletions(-)
diff --git a/include/sound/soc.h b/include/sound/soc.h
index e6e359c1a2ac..1b7ceb018bf9 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -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(
diff --git a/sound/soc/soc-devres.c b/sound/soc/soc-devres.c
index 4534a1c03e8e..c6364caabc0e 100644
--- a/sound/soc/soc-devres.c
+++ b/sound/soc/soc-devres.c
@@ -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;
--
2.47.0
On Mon, 28 Oct 2024 02:12:26 +0000, linux@treblig.org wrote:
> 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.
>
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: soc-devres: Remove unused devm_snd_soc_register_dai
commit: dea15b2abdb09608af5909ed7d168ec20f36a81a
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
© 2016 - 2026 Red Hat, Inc.