diff options
author | Eric Miao <eric.y.miao@gmail.com> | 2009-03-02 20:41:00 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-03-04 17:29:47 -0500 |
commit | 6335d05548eece40092000aa91b64a50310d69d5 (patch) | |
tree | ac72c74562f349879a127b4067827476a7875c88 /sound/soc/au1x/psc-ac97.c | |
parent | ff09d49ad0176a5f52a398c137a7ff5f669d6be4 (diff) |
ASoC: make ops a pointer in 'struct snd_soc_dai'
Considering the fact that most cpu_dai or codec_dai are using a same
'snd_soc_dai_ops' for several similar interfaces, 'ops' would be better
made a pointer instead, to make sharing easier and code a bit cleaner.
The patch below is rather preliminary since the asoc tree is being
actively developed, and this touches almost every piece of code,
(and possibly many others in development need to be changed as
well). Building of all codecs are OK, yet to every SoC, I didn't test
that.
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/au1x/psc-ac97.c')
-rw-r--r-- | sound/soc/au1x/psc-ac97.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sound/soc/au1x/psc-ac97.c b/sound/soc/au1x/psc-ac97.c index f0e30aec7f23..479d7bdf1865 100644 --- a/sound/soc/au1x/psc-ac97.c +++ b/sound/soc/au1x/psc-ac97.c | |||
@@ -342,6 +342,11 @@ static int au1xpsc_ac97_resume(struct snd_soc_dai *dai) | |||
342 | return 0; | 342 | return 0; |
343 | } | 343 | } |
344 | 344 | ||
345 | static struct snd_soc_dai_ops au1xpsc_ac97_dai_ops = { | ||
346 | .trigger = au1xpsc_ac97_trigger, | ||
347 | .hw_params = au1xpsc_ac97_hw_params, | ||
348 | }; | ||
349 | |||
345 | struct snd_soc_dai au1xpsc_ac97_dai = { | 350 | struct snd_soc_dai au1xpsc_ac97_dai = { |
346 | .name = "au1xpsc_ac97", | 351 | .name = "au1xpsc_ac97", |
347 | .ac97_control = 1, | 352 | .ac97_control = 1, |
@@ -361,10 +366,7 @@ struct snd_soc_dai au1xpsc_ac97_dai = { | |||
361 | .channels_min = 2, | 366 | .channels_min = 2, |
362 | .channels_max = 2, | 367 | .channels_max = 2, |
363 | }, | 368 | }, |
364 | .ops = { | 369 | .ops = &au1xpsc_ac97_dai_ops, |
365 | .trigger = au1xpsc_ac97_trigger, | ||
366 | .hw_params = au1xpsc_ac97_hw_params, | ||
367 | }, | ||
368 | }; | 370 | }; |
369 | EXPORT_SYMBOL_GPL(au1xpsc_ac97_dai); | 371 | EXPORT_SYMBOL_GPL(au1xpsc_ac97_dai); |
370 | 372 | ||