[alsa-devel] [PATCH 2/2] ASoC: Remove unused "n_widgets" field from snd_soc_dapm struct

Lars-Peter Clausen lars at metafoo.de
Fri Mar 8 13:44:27 CET 2013


Commit 497098be ("ASoC: dapm: Remove bodges for no-widget CODECs") removed the
last user of the n_widgets field. Currently it is incremented for each widget
added, but the value is never used, so we can remove it.

Signed-off-by: Lars-Peter Clausen <lars at metafoo.de>
---
 include/sound/soc-dapm.h | 1 -
 sound/soc/soc-dapm.c     | 1 -
 2 files changed, 2 deletions(-)

diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index 44a30b1..d460902 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -566,7 +566,6 @@ struct snd_soc_dapm_update {
 
 /* DAPM context */
 struct snd_soc_dapm_context {
-	int n_widgets; /* number of widgets in this context */
 	enum snd_soc_bias_level bias_level;
 	enum snd_soc_bias_level suspend_bias_level;
 	struct delayed_work delayed_work;
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index ee94032..eaf9b74 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -3138,7 +3138,6 @@ snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
 		break;
 	}
 
-	dapm->n_widgets++;
 	w->dapm = dapm;
 	w->codec = dapm->codec;
 	w->platform = dapm->platform;
-- 
1.8.0



More information about the Alsa-devel mailing list