Commit a01da00c authored by Axel Lin's avatar Axel Lin Committed by Mark Brown

ASoC: da732x: Merge da732x_dai1_ops and da732x_dai2_ops

da732x_dai1_ops is identical to da732x_dai2_ops, so merge them to
da732x_dai_ops. The da732x_dai_ops is not modified after initialization,
so make it const.
Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Acked-by: default avatarAdam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent d770e558
...@@ -1196,13 +1196,7 @@ static int da732x_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id, ...@@ -1196,13 +1196,7 @@ static int da732x_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,
#define DA732X_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ #define DA732X_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \
SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE)
static struct snd_soc_dai_ops da732x_dai1_ops = { static const struct snd_soc_dai_ops da732x_dai_ops = {
.hw_params = da732x_hw_params,
.set_fmt = da732x_set_dai_fmt,
.set_sysclk = da732x_set_dai_sysclk,
};
static struct snd_soc_dai_ops da732x_dai2_ops = {
.hw_params = da732x_hw_params, .hw_params = da732x_hw_params,
.set_fmt = da732x_set_dai_fmt, .set_fmt = da732x_set_dai_fmt,
.set_sysclk = da732x_set_dai_sysclk, .set_sysclk = da732x_set_dai_sysclk,
...@@ -1227,7 +1221,7 @@ static struct snd_soc_dai_driver da732x_dai[] = { ...@@ -1227,7 +1221,7 @@ static struct snd_soc_dai_driver da732x_dai[] = {
.rates = DA732X_RATES, .rates = DA732X_RATES,
.formats = DA732X_FORMATS, .formats = DA732X_FORMATS,
}, },
.ops = &da732x_dai1_ops, .ops = &da732x_dai_ops,
}, },
{ {
.name = "DA732X_AIFB", .name = "DA732X_AIFB",
...@@ -1247,7 +1241,7 @@ static struct snd_soc_dai_driver da732x_dai[] = { ...@@ -1247,7 +1241,7 @@ static struct snd_soc_dai_driver da732x_dai[] = {
.rates = DA732X_RATES, .rates = DA732X_RATES,
.formats = DA732X_FORMATS, .formats = DA732X_FORMATS,
}, },
.ops = &da732x_dai2_ops, .ops = &da732x_dai_ops,
}, },
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment