[alsa-devel] [PATCH 0/3] ASoC: remove snd_soc_pcm_set/get_drvdata()

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Mon Aug 1 08:07:37 CEST 2016


Hi Mark

snd_soc_pcm_set_drvdata() will set driver data to rtd->dev,
but driver data of rtd->dev is already used as "rtd" on
soc_post_component_init().

	static int soc_post_component_init(xxx)
	{
		...
		dev_set_drvdata(rtd->dev, rtd);
		...
	}

But, ASoC has snd_soc_pcm_set/get_drvdata() to set rtd->dev.
It will overwrite existing data and will break system.
This patch tries to solve this issue.
Intel haswell and qcom is using these functions.

** Note **

I don't have these boards, thus, I did compile test only.

Kuninori Morimoto (3):
      ASoC: sst-haswell-pcm: don't use snd_soc_pcm_set_drvdata()
      ASoC: lpass-platform: don't use snd_soc_pcm_set_drvdata()
      ASoC: remove snd_soc_pcm_set/get_drvdata()

 include/sound/soc.h                       | 11 -----------
 sound/soc/intel/haswell/sst-haswell-pcm.c |  1 -
 sound/soc/qcom/lpass-platform.c           | 14 +++++++-------
 sound/soc/qcom/lpass.h                    |  2 ++
 4 files changed, 9 insertions(+), 19 deletions(-)


More information about the Alsa-devel mailing list