Commit 7618ab52 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Mark Brown

ASoC: codecs: wcd938x: use defines for entries in snd_soc_dai_driver array

snd_soc_dai_driver array in wcd938x driver has two entries whose order
must match order of wcd938x->sdw_priv array.  The wcd938x_bind() and
wcd938x_codec_set_sdw_stream() rely on this order.  wcd938x->sdw_priv
array is indexed by enum with AIF1_PB and AIF1_CAP, so use the same
defines instead of raw numners for snd_soc_dai_driver array.
No functional impact.
Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231019144108.42853-1-krzysztof.kozlowski@linaro.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent e29de7ab
...@@ -3394,7 +3394,7 @@ static const struct snd_soc_dai_ops wcd938x_sdw_dai_ops = { ...@@ -3394,7 +3394,7 @@ static const struct snd_soc_dai_ops wcd938x_sdw_dai_ops = {
}; };
static struct snd_soc_dai_driver wcd938x_dais[] = { static struct snd_soc_dai_driver wcd938x_dais[] = {
[0] = { [AIF1_PB] = {
.name = "wcd938x-sdw-rx", .name = "wcd938x-sdw-rx",
.playback = { .playback = {
.stream_name = "WCD AIF1 Playback", .stream_name = "WCD AIF1 Playback",
...@@ -3407,7 +3407,7 @@ static struct snd_soc_dai_driver wcd938x_dais[] = { ...@@ -3407,7 +3407,7 @@ static struct snd_soc_dai_driver wcd938x_dais[] = {
}, },
.ops = &wcd938x_sdw_dai_ops, .ops = &wcd938x_sdw_dai_ops,
}, },
[1] = { [AIF1_CAP] = {
.name = "wcd938x-sdw-tx", .name = "wcd938x-sdw-tx",
.capture = { .capture = {
.stream_name = "WCD AIF1 Capture", .stream_name = "WCD AIF1 Capture",
......
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