summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2017-10-10 10:23:08 +0100
committerMark Brown <broonie@kernel.org>2017-10-10 10:23:08 +0100
commitd7346278ccb0fd839240d916e45851227e7ef9f4 (patch)
treee58458aa6f37f60f8d666d1e7ffea316134669ea /sound/soc/soc-core.c
parent7dd5d0d954611c05a38bdf843054c639f45ce08b (diff)
parente0dac41b8c21d41534b04d520c1927c2b0ac9b5e (diff)
downloadop-kernel-dev-d7346278ccb0fd839240d916e45851227e7ef9f4.zip
op-kernel-dev-d7346278ccb0fd839240d916e45851227e7ef9f4.tar.gz
Merge branch 'topic/component' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-core
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c34
1 files changed, 23 insertions, 11 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 6ec1273..166b6d2 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -3404,20 +3404,14 @@ static void snd_soc_component_del_unlocked(struct snd_soc_component *component)
list_del(&component->list);
}
-int snd_soc_register_component(struct device *dev,
- const struct snd_soc_component_driver *component_driver,
- struct snd_soc_dai_driver *dai_drv,
- int num_dai)
+int snd_soc_add_component(struct device *dev,
+ struct snd_soc_component *component,
+ const struct snd_soc_component_driver *component_driver,
+ struct snd_soc_dai_driver *dai_drv,
+ int num_dai)
{
- struct snd_soc_component *component;
int ret;
- component = kzalloc(sizeof(*component), GFP_KERNEL);
- if (!component) {
- dev_err(dev, "ASoC: Failed to allocate memory\n");
- return -ENOMEM;
- }
-
ret = snd_soc_component_initialize(component, component_driver, dev);
if (ret)
goto err_free;
@@ -3441,6 +3435,24 @@ err_free:
kfree(component);
return ret;
}
+EXPORT_SYMBOL_GPL(snd_soc_add_component);
+
+int snd_soc_register_component(struct device *dev,
+ const struct snd_soc_component_driver *component_driver,
+ struct snd_soc_dai_driver *dai_drv,
+ int num_dai)
+{
+ struct snd_soc_component *component;
+
+ component = kzalloc(sizeof(*component), GFP_KERNEL);
+ if (!component) {
+ dev_err(dev, "ASoC: Failed to allocate memory\n");
+ return -ENOMEM;
+ }
+
+ return snd_soc_add_component(dev, component, component_driver,
+ dai_drv, num_dai);
+}
EXPORT_SYMBOL_GPL(snd_soc_register_component);
/**
OpenPOWER on IntegriCloud