summaryrefslogtreecommitdiffstats
path: root/include/sound/soc.h
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-01-06 17:12:45 -0800
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-01-10 14:53:56 -0800
commit36ae1a96c4dcb0f6581d595cc5d43cf3a7e648c7 (patch)
treef0de43670060374bf9f2e81a4c2fcb65dc821545 /include/sound/soc.h
parente4e9e05409280b50003280afffe27ade21480dd7 (diff)
downloadop-kernel-dev-36ae1a96c4dcb0f6581d595cc5d43cf3a7e648c7.zip
op-kernel-dev-36ae1a96c4dcb0f6581d595cc5d43cf3a7e648c7.tar.gz
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/soc.h')
-rw-r--r--include/sound/soc.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index f75d1cc..0992dff 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)
OpenPOWER on IntegriCloud