Skip to content

Commit 63efed5

Browse files
morimotobroonie
authored andcommitted
ASoC: soc-card: move snd_soc_card_set/get_drvdata() to soc-card
Card related function should be implemented at soc-card now. This patch moves it. Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 3359e9b commit 63efed5

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

include/sound/soc-card.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,16 @@ int snd_soc_card_jack_new(struct snd_soc_card *card, const char *id, int type,
1414
struct snd_soc_jack *jack,
1515
struct snd_soc_jack_pin *pins, unsigned int num_pins);
1616

17+
/* device driver data */
18+
static inline void snd_soc_card_set_drvdata(struct snd_soc_card *card,
19+
void *data)
20+
{
21+
card->drvdata = data;
22+
}
23+
24+
static inline void *snd_soc_card_get_drvdata(struct snd_soc_card *card)
25+
{
26+
return card->drvdata;
27+
}
28+
1729
#endif /* __SOC_CARD_H */

include/sound/soc.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1260,19 +1260,6 @@ struct soc_enum {
12601260
#endif
12611261
};
12621262

1263-
/* device driver data */
1264-
1265-
static inline void snd_soc_card_set_drvdata(struct snd_soc_card *card,
1266-
void *data)
1267-
{
1268-
card->drvdata = data;
1269-
}
1270-
1271-
static inline void *snd_soc_card_get_drvdata(struct snd_soc_card *card)
1272-
{
1273-
return card->drvdata;
1274-
}
1275-
12761263
static inline bool snd_soc_volsw_is_stereo(struct soc_mixer_control *mc)
12771264
{
12781265
if (mc->reg == mc->rreg && mc->shift == mc->rshift)

0 commit comments

Comments
 (0)