]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: soc-core: makes snd_soc_set_dmi_name() local
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Wed, 12 Feb 2025 02:23:52 +0000 (02:23 +0000)
committerMark Brown <broonie@kernel.org>
Sun, 16 Feb 2025 23:51:01 +0000 (23:51 +0000)
soc-core.c only calls snd_soc_set_dmi_name(), so we don't need to have
EXPORT_SYMBOL_GPL() for it. Let's makes it local function.

No one uses *flavour parameter, let's remove it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87v7tfyk7b.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/soc.h
sound/soc/soc-core.c

index 16e4e488521c0c89453e368a2dd9dea1457b9f44..62c90ef40f1a5db5ffc10eea99b51cffbffb3f47 100644 (file)
@@ -522,16 +522,6 @@ int snd_soc_runtime_calc_hw(struct snd_soc_pcm_runtime *rtd,
 int snd_soc_runtime_set_dai_fmt(struct snd_soc_pcm_runtime *rtd,
        unsigned int dai_fmt);
 
-#ifdef CONFIG_DMI
-int snd_soc_set_dmi_name(struct snd_soc_card *card, const char *flavour);
-#else
-static inline int snd_soc_set_dmi_name(struct snd_soc_card *card,
-                                      const char *flavour)
-{
-       return 0;
-}
-#endif
-
 /* Utility functions to get clock rates from various things */
 int snd_soc_calc_frame_size(int sample_size, int channels, int tdm_slots);
 int snd_soc_params_to_frame_size(const struct snd_pcm_hw_params *params);
index 26b34b68850839089254476685e0a6dddb032a0e..ae7b3e39d5ffbb0c3f32480eeeb6bdc52d288613 100644 (file)
@@ -1887,7 +1887,6 @@ static void append_dmi_string(struct snd_soc_card *card, const char *str)
 /**
  * snd_soc_set_dmi_name() - Register DMI names to card
  * @card: The card to register DMI names
- * @flavour: The flavour "differentiator" for the card amongst its peers.
  *
  * An Intel machine driver may be used by many different devices but are
  * difficult for userspace to differentiate, since machine drivers usually
@@ -1915,7 +1914,7 @@ static void append_dmi_string(struct snd_soc_card *card, const char *str)
  *
  * Returns 0 on success, otherwise a negative error code.
  */
-int snd_soc_set_dmi_name(struct snd_soc_card *card, const char *flavour)
+static int snd_soc_set_dmi_name(struct snd_soc_card *card)
 {
        const char *vendor, *product, *board;
 
@@ -1959,16 +1958,16 @@ int snd_soc_set_dmi_name(struct snd_soc_card *card, const char *flavour)
                return 0;
        }
 
-       /* Add flavour to dmi long name */
-       if (flavour)
-               append_dmi_string(card, flavour);
-
        /* set the card long name */
        card->long_name = card->dmi_longname;
 
        return 0;
 }
-EXPORT_SYMBOL_GPL(snd_soc_set_dmi_name);
+#else
+static inline int snd_soc_set_dmi_name(struct snd_soc_card *card)
+{
+       return 0;
+}
 #endif /* CONFIG_DMI */
 
 static void soc_check_tplg_fes(struct snd_soc_card *card)
@@ -2256,7 +2255,7 @@ static int snd_soc_bind_card(struct snd_soc_card *card)
                goto probe_end;
 
        /* try to set some sane longname if DMI is available */
-       snd_soc_set_dmi_name(card, NULL);
+       snd_soc_set_dmi_name(card);
 
        soc_setup_card_name(card, card->snd_card->shortname,
                            card->name, NULL);