From: Mark Brown Date: Fri, 28 Jan 2011 13:11:47 +0000 (+0000) Subject: ASoC: Add card driver data X-Git-Tag: MMI-PSA29.97-13-9~16612^2~1226^2~27 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dddf3e4c257879bc35cda3f542507c43f2648a2a;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Acked-by: Liam Girdwood --- 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 { struct dentry *debugfs_pop_time; #endif u32 pop_time; + + void *drvdata; }; /* 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, /* device driver data */ +static inline void snd_soc_card_set_drvdata(struct snd_soc_card *card, + void *data) +{ + card->drvdata = data; +} + +static inline void *snd_soc_card_get_drvdata(struct snd_soc_card *card) +{ + return card->drvdata; +} + static inline void snd_soc_codec_set_drvdata(struct snd_soc_codec *codec, void *data) {