[alsa-devel] [PATCH 1/2] ASoC: Drop unused "dapm" field form soc_enum struct
This field was added in commit 2e72f8e ("ASoC: New enum type: value_enum"), but has never been used since. Considering that the soc_enum struct is usually shared between all instances of a CODEC, it also doesn't make much sense to have a pointer to DAPM specific data in it.
Signed-off-by: Lars-Peter Clausen lars@metafoo.de --- include/sound/soc.h | 1 - 1 file changed, 1 deletion(-)
diff --git a/include/sound/soc.h b/include/sound/soc.h index a6a059c..c84062b 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -1086,7 +1086,6 @@ struct soc_enum { unsigned int mask; const char * const *texts; const unsigned int *values; - void *dapm; };
/* codec IO */
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@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;
On Fri, Mar 08, 2013 at 01:44:27PM +0100, Lars-Peter Clausen wrote:
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.
Applied both, thanks.
participants (2)
-
Lars-Peter Clausen
-
Mark Brown