ASoC: Drop unused "dapm" field form soc_enum struct
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.
--- include/sound/soc.h | 1 - 1 file changed, 1 deletion(-)
include/sound/soc.h +0 -1
@@ -1086,7 +1086,6 @@ struct soc_enum {unsigned int mask;const char *const *texts;const unsigned int *values; -void *dapm; };/* codec IO */
Signature · 1 line
1.8.0
PATCH 2/2 ASoC: Remove unused "n_widgets" field from snd_soc_dapm struct
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.
--- include/sound/soc-dapm.h | 1 - sound/soc/soc-dapm.c | 1 - 2 files changed, 2 deletions(-)
include/sound/soc-dapm.h +0 -1
@@ -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;
sound/soc/soc-dapm.c +0 -1
@@ -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;
Signature · 1 line
1.8.0
Mark Brown
AppliedRe: [PATCH 2/2] ASoC: Remove unused "n_widgets" field from snd_soc_dapm struct
Quoted 3 lines · Lars-Peter Clausen
Commit
497098be("ASoC: dapm: Remove bodges for no-widget CODECs") removed the last user of then_widgetsfield. Currently it is incremented for each widget added, but the value is never used, so we can remove it.
Applied both, thanks.