]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
Revert "ASoC: core: use component driver name as component name"
authorKrzysztof Kozlowski <krzk@kernel.org>
Fri, 31 May 2019 10:34:02 +0000 (12:34 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 3 Jun 2019 16:46:47 +0000 (17:46 +0100)
Using component driver as a name is not unique and it breaks audio in
certain configurations, e.g. Hardkernel Odroid XU3 board where following
components are registered:
 - "3830000.i2s" with driver name "snd_dmaengine_pcm"
 - "3830000.i2s-sec" with driver name "snd_dmaengine_pcm"
 - "3830000.i2s" with driver name "samsung-i2s"

This reverts commit b19671d6caf1ac393681864d5d85dda9fa99a448.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-core.c

index 2d3520fca613a099588fd5743e14dd74e63e4db9..7abb017a83f30102e340eb1143e9862bffc39223 100644 (file)
@@ -3113,10 +3113,7 @@ static int snd_soc_component_initialize(struct snd_soc_component *component,
 {
        struct snd_soc_dapm_context *dapm;
 
-       if (driver->name)
-               component->name = kstrdup(driver->name, GFP_KERNEL);
-       else
-               component->name = fmt_single_name(dev, &component->id);
+       component->name = fmt_single_name(dev, &component->id);
        if (!component->name) {
                dev_err(dev, "ASoC: Failed to allocate name\n");
                return -ENOMEM;