aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-01-28 08:11:47 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-01-28 08:20:47 -0500
commitdddf3e4c257879bc35cda3f542507c43f2648a2a (patch)
treee832f150045ca50d879d979830ebe1a0844ac5dc /include/sound
parent70d29331ac551c11e6e3934f43a548ae8154351e (diff)
ASoC: Add card driver data
Provide driver data for cards within the card structure. To simplify the implementation of the PM operations we don't use the struct device driver data as this is used by the core to retrieve the card in callbacks from the device model and PM core. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/soc.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 7ecdaefd1b63..4b6c0a8c332f 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -705,6 +705,8 @@ struct snd_soc_card {
705 struct dentry *debugfs_pop_time; 705 struct dentry *debugfs_pop_time;
706#endif 706#endif
707 u32 pop_time; 707 u32 pop_time;
708
709 void *drvdata;
708}; 710};
709 711
710/* SoC machine DAI configuration, glues a codec and cpu DAI together */ 712/* SoC machine DAI configuration, glues a codec and cpu DAI together */
@@ -756,6 +758,17 @@ unsigned int snd_soc_write(struct snd_soc_codec *codec,
756 758
757/* device driver data */ 759/* device driver data */
758 760
761static inline void snd_soc_card_set_drvdata(struct snd_soc_card *card,
762 void *data)
763{
764 card->drvdata = data;
765}
766
767static inline void *snd_soc_card_get_drvdata(struct snd_soc_card *card)
768{
769 return card->drvdata;
770}
771
759static inline void snd_soc_codec_set_drvdata(struct snd_soc_codec *codec, 772static inline void snd_soc_codec_set_drvdata(struct snd_soc_codec *codec,
760 void *data) 773 void *data)
761{ 774{