diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-01-06 17:12:45 -0800 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-01-10 14:53:56 -0800 |
commit | 36ae1a96c4dcb0f6581d595cc5d43cf3a7e648c7 (patch) | |
tree | f0de43670060374bf9f2e81a4c2fcb65dc821545 /sound/soc/soc-dapm.c | |
parent | e4e9e05409280b50003280afffe27ade21480dd7 (diff) |
ASoC: Dynamically allocate the rtd device for a non-empty release()
The device model needs a release() function so it can free devices when
they become dereferenced. Do that for rtds.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r-- | sound/soc/soc-dapm.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index e174d0811dae..3ad1f59b8028 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -1738,8 +1738,7 @@ static int dapm_mixer_update_power(struct snd_soc_dapm_widget *widget, static ssize_t dapm_widget_show(struct device *dev, struct device_attribute *attr, char *buf) { - struct snd_soc_pcm_runtime *rtd = - container_of(dev, struct snd_soc_pcm_runtime, dev); + struct snd_soc_pcm_runtime *rtd = dev_get_drvdata(dev); struct snd_soc_codec *codec =rtd->codec; struct snd_soc_dapm_widget *w; int count = 0; |