提交 7f92581b 编写于 作者: F Fabio Baltieri 提交者: Mark Brown

ASoC: ab8500-codec: Move codec ops on a separate structure

Define ab8500 codec operations structure on its own rather than inline
with snd_soc_dai_drivers to clean up the code and make the style
coherent with other codec drivers.
Signed-off-by: NFabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 6ee0b4b0
...@@ -2380,6 +2380,11 @@ static int ab8500_codec_set_dai_tdm_slot(struct snd_soc_dai *dai, ...@@ -2380,6 +2380,11 @@ static int ab8500_codec_set_dai_tdm_slot(struct snd_soc_dai *dai,
return 0; return 0;
} }
static const struct snd_soc_dai_ops ab8500_codec_ops = {
.set_fmt = ab8500_codec_set_dai_fmt,
.set_tdm_slot = ab8500_codec_set_dai_tdm_slot,
};
static struct snd_soc_dai_driver ab8500_codec_dai[] = { static struct snd_soc_dai_driver ab8500_codec_dai[] = {
{ {
.name = "ab8500-codec-dai.0", .name = "ab8500-codec-dai.0",
...@@ -2391,12 +2396,7 @@ static struct snd_soc_dai_driver ab8500_codec_dai[] = { ...@@ -2391,12 +2396,7 @@ static struct snd_soc_dai_driver ab8500_codec_dai[] = {
.rates = AB8500_SUPPORTED_RATE, .rates = AB8500_SUPPORTED_RATE,
.formats = AB8500_SUPPORTED_FMT, .formats = AB8500_SUPPORTED_FMT,
}, },
.ops = (struct snd_soc_dai_ops[]) { .ops = &ab8500_codec_ops,
{
.set_tdm_slot = ab8500_codec_set_dai_tdm_slot,
.set_fmt = ab8500_codec_set_dai_fmt,
}
},
.symmetric_rates = 1 .symmetric_rates = 1
}, },
{ {
...@@ -2409,12 +2409,7 @@ static struct snd_soc_dai_driver ab8500_codec_dai[] = { ...@@ -2409,12 +2409,7 @@ static struct snd_soc_dai_driver ab8500_codec_dai[] = {
.rates = AB8500_SUPPORTED_RATE, .rates = AB8500_SUPPORTED_RATE,
.formats = AB8500_SUPPORTED_FMT, .formats = AB8500_SUPPORTED_FMT,
}, },
.ops = (struct snd_soc_dai_ops[]) { .ops = &ab8500_codec_ops,
{
.set_tdm_slot = ab8500_codec_set_dai_tdm_slot,
.set_fmt = ab8500_codec_set_dai_fmt,
}
},
.symmetric_rates = 1 .symmetric_rates = 1
} }
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册