diff mbox

[v2,11/11] ASoC: dapm: Remove platform field from widget and dapm context struct

Message ID 1402935191-18398-12-git-send-email-lars@metafoo.de (mailing list archive)
State Accepted
Commit 88a8fe3df65fa0229b04f1c03411062230091cdd
Headers show

Commit Message

Lars-Peter Clausen June 16, 2014, 4:13 p.m. UTC
The platform field in the snd_soc_dapm_widget and snd_soc_dapm_context structs
is now unused can be removed. New code that wants to get the platform for a
widget or dapm context should use snd_soc_dapm_to_platform(w->dapm) or
snd_soc_dapm_to_platform(dapm).

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

Comments

Mark Brown June 21, 2014, 8:36 p.m. UTC | #1
On Mon, Jun 16, 2014 at 06:13:11PM +0200, Lars-Peter Clausen wrote:
> The platform field in the snd_soc_dapm_widget and snd_soc_dapm_context structs
> is now unused can be removed. New code that wants to get the platform for a
> widget or dapm context should use snd_soc_dapm_to_platform(w->dapm) or
> snd_soc_dapm_to_platform(dapm).

Applied, thanks.
diff mbox

Patch

diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index e292683..aac04ff 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -526,7 +526,6 @@  struct snd_soc_dapm_widget {
 	const char *name;		/* widget name */
 	const char *sname;	/* stream name */
 	struct snd_soc_codec *codec;
-	struct snd_soc_platform *platform;
 	struct list_head list;
 	struct snd_soc_dapm_context *dapm;
 
@@ -595,7 +594,6 @@  struct snd_soc_dapm_context {
 	struct device *dev; /* from parent - for debug */
 	struct snd_soc_component *component; /* parent component */
 	struct snd_soc_codec *codec; /* parent codec */
-	struct snd_soc_platform *platform; /* parent platform */
 	struct snd_soc_card *card; /* parent card */
 
 	/* used during DAPM updates */
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 19dfa80..7ad4838 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -4176,7 +4176,6 @@  int snd_soc_add_platform(struct device *dev, struct snd_soc_platform *platform,
 
 	platform->dev = dev;
 	platform->driver = platform_drv;
-	platform->component.dapm.platform = platform;
 	if (platform_drv->write)
 		platform->component.write = snd_soc_platform_drv_write;
 	if (platform_drv->read)
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 4702b92..4bf08cf 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -3097,7 +3097,6 @@  snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
 
 	w->dapm = dapm;
 	w->codec = dapm->codec;
-	w->platform = dapm->platform;
 	INIT_LIST_HEAD(&w->sources);
 	INIT_LIST_HEAD(&w->sinks);
 	INIT_LIST_HEAD(&w->list);