Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dddf3e4c authored by Mark Brown's avatar Mark Brown
Browse files

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: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
parent 70d29331
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -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)
{