From 36ae1a96c4dcb0f6581d595cc5d43cf3a7e648c7 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Fri, 6 Jan 2012 17:12:45 -0800 Subject: 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 --- include/sound/soc.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/sound') diff --git a/include/sound/soc.h b/include/sound/soc.h index f75d1ccc5c58..0992dff55959 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -847,7 +847,7 @@ struct snd_soc_card { /* SoC machine DAI configuration, glues a codec and cpu DAI together */ struct snd_soc_pcm_runtime { - struct device dev; + struct device *dev; struct snd_soc_card *card; struct snd_soc_dai_link *dai_link; struct mutex pcm_mutex; @@ -933,12 +933,12 @@ static inline void *snd_soc_platform_get_drvdata(struct snd_soc_platform *platfo static inline void snd_soc_pcm_set_drvdata(struct snd_soc_pcm_runtime *rtd, void *data) { - dev_set_drvdata(&rtd->dev, data); + dev_set_drvdata(rtd->dev, data); } static inline void *snd_soc_pcm_get_drvdata(struct snd_soc_pcm_runtime *rtd) { - return dev_get_drvdata(&rtd->dev); + return dev_get_drvdata(rtd->dev); } static inline void snd_soc_initialize_card_lists(struct snd_soc_card *card) -- cgit v1.2.3