diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2020-06-04 10:06:32 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-06-15 19:21:20 +0200 |
commit | 536aba1dd4939bf647f5d182d4f101ae548e6505 (patch) | |
tree | 570135820c86c5956e369b5588aa68353421b56a /sound/soc/soc-component.c | |
parent | ASoC: soc-component: move snd_soc_component_xxx_regmap() to soc-component (diff) | |
download | linux-536aba1dd4939bf647f5d182d4f101ae548e6505.tar.xz linux-536aba1dd4939bf647f5d182d4f101ae548e6505.zip |
ASoC: soc-component: move snd_soc_component_initialize() to soc-component.c
snd_soc_component_xxx() should be implemented at soc-component.c
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87r1uvw8zb.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-component.c')
-rw-r--r-- | sound/soc/soc-component.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c index 3c96a1adaa8b..5bf2e71d3d83 100644 --- a/sound/soc/soc-component.c +++ b/sound/soc/soc-component.c @@ -8,6 +8,22 @@ #include <linux/module.h> #include <sound/soc.h> +int snd_soc_component_initialize(struct snd_soc_component *component, + const struct snd_soc_component_driver *driver, + struct device *dev, const char *name) +{ + INIT_LIST_HEAD(&component->dai_list); + INIT_LIST_HEAD(&component->dobj_list); + INIT_LIST_HEAD(&component->card_list); + mutex_init(&component->io_mutex); + + component->name = name; + component->dev = dev; + component->driver = driver; + + return 0; +} + /** * snd_soc_component_set_sysclk - configure COMPONENT system or master clock. * @component: COMPONENT |