diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-01-07 01:12:45 (GMT) |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-01-10 22:53:56 (GMT) |
commit | 36ae1a96c4dcb0f6581d595cc5d43cf3a7e648c7 (patch) | |
tree | f0de43670060374bf9f2e81a4c2fcb65dc821545 /sound/soc/soc-dapm.c | |
parent | e4e9e05409280b50003280afffe27ade21480dd7 (diff) | |
download | linux-fsl-qoriq-36ae1a96c4dcb0f6581d595cc5d43cf3a7e648c7.tar.xz |
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 e174d08..3ad1f59 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; |