[PATCH v2 21/21] ASoC: cleanup dai / component active code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>

No one is using dai->active, snd_soc_component_is_active().
Let's remove these.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
---
v1 -> v2
	- adjust to latest patch-set

 include/sound/soc-component.h | 5 -----
 include/sound/soc-dai.h       | 2 --
 sound/soc/soc-dai.c           | 2 +-
 3 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h
index 820b9b618f97..9360936b7963 100644
--- a/include/sound/soc-component.h
+++ b/include/sound/soc-component.h
@@ -389,11 +389,6 @@ static inline void *snd_soc_component_get_drvdata(struct snd_soc_component *c)
 	return dev_get_drvdata(c->dev);
 }
 
-static inline bool snd_soc_component_is_active(
-	struct snd_soc_component *component)
-{
-	return component->active != 0;
-}
 #define snd_soc_component_active(component)  ((component)->active)
 
 /* component pin */
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h
index d55dd0474096..e87b510f6f54 100644
--- a/include/sound/soc-dai.h
+++ b/include/sound/soc-dai.h
@@ -357,8 +357,6 @@ struct snd_soc_dai {
 	/* DAI runtime info */
 	unsigned int stream_active[SNDRV_PCM_STREAM_LAST + 1]; /* usage count */
 
-	unsigned int active;
-
 	struct snd_soc_dapm_widget *playback_widget;
 	struct snd_soc_dapm_widget *capture_widget;
 
diff --git a/sound/soc/soc-dai.c b/sound/soc/soc-dai.c
index 8172ff42d796..ce4e1fd1ab79 100644
--- a/sound/soc/soc-dai.c
+++ b/sound/soc/soc-dai.c
@@ -393,7 +393,7 @@ void snd_soc_dai_action(struct snd_soc_dai *dai,
 {
 	/* see snd_soc_dai_stream_active() */
 	dai->stream_active[stream]	+= action;
-	dai->active			+= action;
+
 	/* see snd_soc_component_active() */
 	dai->component->active		+= action;
 }
-- 
2.17.1




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux