提交 826e83de 编写于 作者: K Kuninori Morimoto 提交者: Mark Brown

ASoC: rsnd: fixup for_each_rsnd_mod_array{s} iterator increment

commit 5f222a29 ("ASoC: rsnd: use for_each_rsnd_mod_xxx() ...")
modifies rsnd_dai_call() to use for_each_rsnd_mod_arrays().

Current rsnd is incrementing iterator in rsnd_mod_next(),
but the iterator will indicate +1 position in for_each loop in
this case. Incremental position should be inside for()
Reported-by: NHoan Nguyen An <na-hoan@jinso.co.jp>
Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 a5de5b74
......@@ -363,8 +363,6 @@ struct rsnd_mod *rsnd_mod_next(int *iterator,
if (!mod)
continue;
(*iterator)++;
return mod;
}
......
......@@ -374,10 +374,10 @@ struct rsnd_mod *rsnd_mod_next(int *iterator,
int array_size);
#define for_each_rsnd_mod(iterator, pos, io) \
for (iterator = 0; \
(pos = rsnd_mod_next(&iterator, io, NULL, 0));)
(pos = rsnd_mod_next(&iterator, io, NULL, 0)); iterator++)
#define for_each_rsnd_mod_arrays(iterator, pos, io, array, size) \
for (iterator = 0; \
(pos = rsnd_mod_next(&iterator, io, array, size));)
(pos = rsnd_mod_next(&iterator, io, array, size)); iterator++)
#define for_each_rsnd_mod_array(iterator, pos, io, array) \
for_each_rsnd_mod_arrays(iterator, pos, io, array, ARRAY_SIZE(array))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册