diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2021-04-16 05:00:26 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-04-16 16:34:12 +0300 |
commit | 8f1a16818a08047c83bc6e29efc07b15fd11fa29 (patch) | |
tree | c6c09fe822a755deefc30726a638aa48f0f719bf /sound/soc/soc-utils.c | |
parent | ee39d77ed91f220b1458137118dea158a095d5c5 (diff) | |
download | linux-8f1a16818a08047c83bc6e29efc07b15fd11fa29.tar.xz |
ASoC: soc-utils: add snd_soc_component_is_dummy()
There is snd_soc_dai_is_dummy(), but not for component.
This patch adds it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87zgxzxa2t.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-utils.c')
-rw-r--r-- | sound/soc/soc-utils.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/soc/soc-utils.c b/sound/soc/soc-utils.c index f27f94ca064b..98383fd76224 100644 --- a/sound/soc/soc-utils.c +++ b/sound/soc/soc-utils.c @@ -131,6 +131,12 @@ int snd_soc_dai_is_dummy(struct snd_soc_dai *dai) return 0; } +int snd_soc_component_is_dummy(struct snd_soc_component *component) +{ + return ((component->driver == &dummy_platform) || + (component->driver == &dummy_codec)); +} + static int snd_soc_dummy_probe(struct platform_device *pdev) { int ret; |