[PATCH v2 05/19] ASoC: soc-card: move snd_soc_card_set/get_drvdata() to soc-card

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Thu May 28 03:48:11 CEST 2020


From: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>

Card related function should be implemented at soc-card now.
This patch moves it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
---
 include/sound/soc-card.h | 12 ++++++++++++
 include/sound/soc.h      | 13 -------------
 2 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/include/sound/soc-card.h b/include/sound/soc-card.h
index 775c08d056ae..e60ad39b87bd 100644
--- a/include/sound/soc-card.h
+++ b/include/sound/soc-card.h
@@ -14,4 +14,16 @@ int snd_soc_card_jack_new(struct snd_soc_card *card, const char *id, int type,
 			  struct snd_soc_jack *jack,
 			  struct snd_soc_jack_pin *pins, unsigned int num_pins);
 
+/* 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;
+}
+
 #endif /* __SOC_CARD_H */
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 38b21e815a28..3072298e756a 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1260,19 +1260,6 @@ struct soc_enum {
 #endif
 };
 
-/* 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 bool snd_soc_volsw_is_stereo(struct soc_mixer_control *mc)
 {
 	if (mc->reg == mc->rreg && mc->shift == mc->rshift)
-- 
2.17.1



More information about the Alsa-devel mailing list