]> git.karo-electronics.de Git - linux-beck.git/blobdiff - sound/soc/soc-dapm.c
ASoC: Dynamically allocate the rtd device for a non-empty release()
[linux-beck.git] / sound / soc / soc-dapm.c
index e174d0811dae33bd4907b7b3f766fa23d9334f7f..3ad1f59b80281cfc7c9ace89ae8a30d34317fe7a 100644 (file)
@@ -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;