diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-01-06 20:12:45 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-01-10 17:53:56 -0500 |
commit | 36ae1a96c4dcb0f6581d595cc5d43cf3a7e648c7 (patch) | |
tree | f0de43670060374bf9f2e81a4c2fcb65dc821545 /include/sound | |
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 'include/sound')
-rw-r--r-- | include/sound/soc.h | 6 |
1 files changed, 3 insertions, 3 deletions
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 { | |||
847 | 847 | ||
848 | /* SoC machine DAI configuration, glues a codec and cpu DAI together */ | 848 | /* SoC machine DAI configuration, glues a codec and cpu DAI together */ |
849 | struct snd_soc_pcm_runtime { | 849 | struct snd_soc_pcm_runtime { |
850 | struct device dev; | 850 | struct device *dev; |
851 | struct snd_soc_card *card; | 851 | struct snd_soc_card *card; |
852 | struct snd_soc_dai_link *dai_link; | 852 | struct snd_soc_dai_link *dai_link; |
853 | struct mutex pcm_mutex; | 853 | struct mutex pcm_mutex; |
@@ -933,12 +933,12 @@ static inline void *snd_soc_platform_get_drvdata(struct snd_soc_platform *platfo | |||
933 | static inline void snd_soc_pcm_set_drvdata(struct snd_soc_pcm_runtime *rtd, | 933 | static inline void snd_soc_pcm_set_drvdata(struct snd_soc_pcm_runtime *rtd, |
934 | void *data) | 934 | void *data) |
935 | { | 935 | { |
936 | dev_set_drvdata(&rtd->dev, data); | 936 | dev_set_drvdata(rtd->dev, data); |
937 | } | 937 | } |
938 | 938 | ||
939 | static inline void *snd_soc_pcm_get_drvdata(struct snd_soc_pcm_runtime *rtd) | 939 | static inline void *snd_soc_pcm_get_drvdata(struct snd_soc_pcm_runtime *rtd) |
940 | { | 940 | { |
941 | return dev_get_drvdata(&rtd->dev); | 941 | return dev_get_drvdata(rtd->dev); |
942 | } | 942 | } |
943 | 943 | ||
944 | static inline void snd_soc_initialize_card_lists(struct snd_soc_card *card) | 944 | static inline void snd_soc_initialize_card_lists(struct snd_soc_card *card) |