Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 96da4e5b authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Mark Brown
Browse files

ASoC: Remove codec field from snd_soc_dapm_widget



There are no more users of this field left so it can finally be removed.
New users should use snd_soc_dapm_to_codec(w->dapm);

The reason why it is removed is because it doesn't fit to well anymore in
the componentized ASoC hierarchy, where DAPM works on the snd_soc_component
level. And the alternative of snd_soc_dapm_to_codec(w->dapm) typically
generates the same amount of code, so there is really no reason to keep it.

For automatic conversion the following coccinelle semantic patch can be used:
// <smpl>
@@
struct snd_soc_dapm_widget *w;
@@
-w->codec
+snd_soc_dapm_to_codec(w->dapm)
// </smpl>

Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 46f20872
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -526,7 +526,6 @@ struct snd_soc_dapm_widget {
	enum snd_soc_dapm_type id;
	enum snd_soc_dapm_type id;
	const char *name;		/* widget name */
	const char *name;		/* widget name */
	const char *sname;	/* stream name */
	const char *sname;	/* stream name */
	struct snd_soc_codec *codec;
	struct list_head list;
	struct list_head list;
	struct snd_soc_dapm_context *dapm;
	struct snd_soc_dapm_context *dapm;


+0 −2
Original line number Original line Diff line number Diff line
@@ -3130,8 +3130,6 @@ snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
	}
	}


	w->dapm = dapm;
	w->dapm = dapm;
	if (dapm->component)
		w->codec = dapm->component->codec;
	INIT_LIST_HEAD(&w->sources);
	INIT_LIST_HEAD(&w->sources);
	INIT_LIST_HEAD(&w->sinks);
	INIT_LIST_HEAD(&w->sinks);
	INIT_LIST_HEAD(&w->list);
	INIT_LIST_HEAD(&w->list);