aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/cs4270.c
diff options
context:
space:
mode:
authorEric Miao <eric.y.miao@gmail.com>2009-03-02 20:41:00 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-03-04 17:29:47 -0500
commit6335d05548eece40092000aa91b64a50310d69d5 (patch)
treeac72c74562f349879a127b4067827476a7875c88 /sound/soc/codecs/cs4270.c
parentff09d49ad0176a5f52a398c137a7ff5f669d6be4 (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/codecs/cs4270.c')
-rw-r--r--sound/soc/codecs/cs4270.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c
index f86f33cc1798..7ae3d6520e3f 100644
--- a/sound/soc/codecs/cs4270.c
+++ b/sound/soc/codecs/cs4270.c
@@ -503,6 +503,13 @@ static const struct snd_kcontrol_new cs4270_snd_controls[] = {
503 */ 503 */
504static struct snd_soc_codec *cs4270_codec; 504static struct snd_soc_codec *cs4270_codec;
505 505
506static struct snd_soc_dai_ops cs4270_dai_ops = {
507 .hw_params = cs4270_hw_params,
508 .set_sysclk = cs4270_set_dai_sysclk,
509 .set_fmt = cs4270_set_dai_fmt,
510 .digital_mute = cs4270_mute,
511};
512
506struct snd_soc_dai cs4270_dai = { 513struct snd_soc_dai cs4270_dai = {
507 .name = "cs4270", 514 .name = "cs4270",
508 .playback = { 515 .playback = {
@@ -519,12 +526,7 @@ struct snd_soc_dai cs4270_dai = {
519 .rates = 0, 526 .rates = 0,
520 .formats = CS4270_FORMATS, 527 .formats = CS4270_FORMATS,
521 }, 528 },
522 .ops = { 529 .ops = &cs4270_dai_ops,
523 .hw_params = cs4270_hw_params,
524 .set_sysclk = cs4270_set_dai_sysclk,
525 .set_fmt = cs4270_set_dai_fmt,
526 .digital_mute = cs4270_mute,
527 },
528}; 530};
529EXPORT_SYMBOL_GPL(cs4270_dai); 531EXPORT_SYMBOL_GPL(cs4270_dai);
530 532