summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/sound/soc.h2
-rw-r--r--sound/soc/soc-core.c13
2 files changed, 14 insertions, 1 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 8f57adfae53d..229c23815eff 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1469,6 +1469,8 @@ int snd_soc_component_update_bits_async(struct snd_soc_component *component,
void snd_soc_component_async_complete(struct snd_soc_component *component);
int snd_soc_component_test_bits(struct snd_soc_component *component,
unsigned int reg, unsigned int mask, unsigned int value);
+struct snd_soc_component *soc_find_component(
+ const struct device_node *of_node, const char *name);
#ifdef CONFIG_REGMAP
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index c1a035be918b..19defa060105 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -861,7 +861,17 @@ EXPORT_SYMBOL_GPL(snd_soc_resume);
static const struct snd_soc_dai_ops null_dai_ops = {
};
-static struct snd_soc_component *soc_find_component(
+/**
+ * soc_find_component: find a component from component_list in ASoC core
+ *
+ * @of_node: of_node of the component to query.
+ * @name: name of the component to query.
+ *
+ * function to find out if a component is already registered with ASoC core.
+ *
+ * Returns component handle for success, else NULL error.
+ */
+struct snd_soc_component *soc_find_component(
const struct device_node *of_node, const char *name)
{
struct snd_soc_component *component;
@@ -879,6 +889,7 @@ static struct snd_soc_component *soc_find_component(
return NULL;
}
+EXPORT_SYMBOL(soc_find_component);
static struct snd_soc_dai *snd_soc_find_dai(
const struct snd_soc_dai_link_component *dlc)