* [PATCH 1/2] ASoC: Drop unused "dapm" field form soc_enum struct
@ 2013-03-08 12:44 Lars-Peter Clausen
2013-03-08 12:44 ` [PATCH 2/2] ASoC: Remove unused "n_widgets" field from snd_soc_dapm struct Lars-Peter Clausen
0 siblings, 1 reply; 3+ messages in thread
From: Lars-Peter Clausen @ 2013-03-08 12:44 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood; +Cc: alsa-devel, Lars-Peter Clausen
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 */
--
1.8.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] ASoC: Remove unused "n_widgets" field from snd_soc_dapm struct
2013-03-08 12:44 [PATCH 1/2] ASoC: Drop unused "dapm" field form soc_enum struct Lars-Peter Clausen
@ 2013-03-08 12:44 ` Lars-Peter Clausen
2013-03-08 12:45 ` Mark Brown
0 siblings, 1 reply; 3+ messages in thread
From: Lars-Peter Clausen @ 2013-03-08 12:44 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood; +Cc: alsa-devel, Lars-Peter Clausen
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;
--
1.8.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] ASoC: Remove unused "n_widgets" field from snd_soc_dapm struct
2013-03-08 12:44 ` [PATCH 2/2] ASoC: Remove unused "n_widgets" field from snd_soc_dapm struct Lars-Peter Clausen
@ 2013-03-08 12:45 ` Mark Brown
0 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2013-03-08 12:45 UTC (permalink / raw)
To: Lars-Peter Clausen; +Cc: alsa-devel, Liam Girdwood
[-- Attachment #1.1: Type: text/plain, Size: 311 bytes --]
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.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-03-08 12:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-08 12:44 [PATCH 1/2] ASoC: Drop unused "dapm" field form soc_enum struct Lars-Peter Clausen
2013-03-08 12:44 ` [PATCH 2/2] ASoC: Remove unused "n_widgets" field from snd_soc_dapm struct Lars-Peter Clausen
2013-03-08 12:45 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).