diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2017-11-01 03:16:58 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-11-01 05:53:01 -0400 |
commit | 21781e87881f9c420871b1d1f3f29d4cd7bffb10 (patch) | |
tree | bba96e8ada350a6692b211e3fe815e57c6c17f71 | |
parent | ce548931207c0d0059bd90171e2c458f897354d7 (diff) |
ASoC: rsnd: rsnd_ssi_run_mods() needs to care ssi_parent_mod
SSI parent mod might be NULL. ssi_parent_mod() needs to care
about it. Otherwise, it uses negative shift.
This patch fixes it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/sh/rcar/ssi.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c index 58e3420a1f05..43c31d153ea6 100644 --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c | |||
@@ -195,10 +195,15 @@ static u32 rsnd_ssi_run_mods(struct rsnd_dai_stream *io) | |||
195 | { | 195 | { |
196 | struct rsnd_mod *ssi_mod = rsnd_io_to_mod_ssi(io); | 196 | struct rsnd_mod *ssi_mod = rsnd_io_to_mod_ssi(io); |
197 | struct rsnd_mod *ssi_parent_mod = rsnd_io_to_mod_ssip(io); | 197 | struct rsnd_mod *ssi_parent_mod = rsnd_io_to_mod_ssip(io); |
198 | u32 mods; | ||
198 | 199 | ||
199 | return rsnd_ssi_multi_slaves_runtime(io) | | 200 | mods = rsnd_ssi_multi_slaves_runtime(io) | |
200 | 1 << rsnd_mod_id(ssi_mod) | | 201 | 1 << rsnd_mod_id(ssi_mod); |
201 | 1 << rsnd_mod_id(ssi_parent_mod); | 202 | |
203 | if (ssi_parent_mod) | ||
204 | mods |= 1 << rsnd_mod_id(ssi_parent_mod); | ||
205 | |||
206 | return mods; | ||
202 | } | 207 | } |
203 | 208 | ||
204 | u32 rsnd_ssi_multi_slaves_runtime(struct rsnd_dai_stream *io) | 209 | u32 rsnd_ssi_multi_slaves_runtime(struct rsnd_dai_stream *io) |